Re: odbc resources
- Posted by Craig Welch <craig at singmail.com> Nov 16, 2005
- 483 views
Matt Lewis wrote: >OK, I think I know what's happening. I'm not reusing the bookkeeping >sequence handle_children properly. > ><snip> >...and the for-loop in the middle of freeHandleODBC(): >}}} <eucode> > for i = 1 to length( handle_children[id] ) do > freeHandleODBC( handle_children[id][i] ) > > -- mark this as ready for reuse > handle_children[id][i] = -1 > end for ></eucode> {{{ > Thanks Matt, but that didn=92t do it. As far as I can see, that bit of code is never being executed, because above it is: <EUCODE> handle = getHandleODBC( id ) if not handle then return end if </EUCODE> This is always the case (not handle). My trace has find id = 3, handle = = 0. This seems to be because in function getHandleODBC: <EUCODE> if id > length( handle_odbc ) or handle_odbc[id] = -1 then return 0 end if </EUCODE> Thus a handle of =961 will always appear to be *not* handle ... I don=92t know if I=92m on the right track, but I=92d appreciate your furth= er advice. Thanks, -- Craig