Hi,
You should only have to clear the statement if you are fetching a single
row or fetching into a set variables. This will happen even if the
result set on the backend contains only one record. If you are fetching
row by row in a loop, fetching one more time beyond the last record
should clear out the result table. If you execute a command that
fetches all the rows, I would think you shouldn't see the problem. (the
code should take care of this)
The fact that the older connection didn't exhibit this problem may be
that it calls a diffent set of lib calls in TDS that cleans up after
itself, or, the module cleans up after itself. I have seen this dual
behavior in another product that I use to connect to sybase, Studio. If
I use their V2 dams, I don't have to worry about cleared result sets. If
use their newer, object oriented V3 dams, I have to execute a
StatementObj.$clear after any $fetch into a row or fetchinto a set of
variables, even if the query is expected to find only one row. When I
fetch into a list, the dam clears out the result set (presumably, the
internal code executes row fetches until it receives no return)
terry
- Re: Attempt to initiate a new SQL Server operation ... Terence J. Young, D.C.
-