[unixODBC-dev] Too many cursors open
nick at lurcher.org
Tue Nov 8 10:28:52 GMT 2005
anand.vasudevan at wipro.com wrote:
>>From the ODBC API documentation I found that the application has to
> explicitly call SQLCloseCursor after every query execution.
> In our code we do call SQLFreeHandle each time we need to free the
> statement handle but not SQLCloseCursor.
> Should the application call SQLCloseCursor after it calls SQLFetch to
> fetch the query results? Will SQLFreeHandle not take care of it?
> Thanks in advance.
Are you checking the return status from the SQLFreeHandle, based on the
ODBC state transitions docs, you can't call SQLFreeHandle on a open
cursor, its a error, you need to close the cursor with SQLCloseCursor or
SQLFreeStmt( SQL_CLOSE ) first.
More information about the unixODBC-dev