ALL,
I'm getting "HY010" (call sequence error) when executing SQLFreeHandle( SQL_HANDLE_DBC, hdbc );.
Is there an easy way to find which statement is still executing?
I am running a thread, but it releases all statements it allocates...
TIA!!!
EDIT:
For the user with the nick "nbk":
I have an application that uses native ODBC calls When the application closes, I call SQLFreeHandle( SQL_HANDLE_DBC, ... ); At this point there shouldn't be any queries running and the connection should be closed from 1 line above. Unfortunately, that call produces the error and the error is "HY010", which means that some query is still running (a statement is not closed on the connection). My question is - is there an easy way to find which query is still executing (statement is not closed/released.).
I would attach ODBC log file but its `90K big...
So I'm hoping that there is something easier to find the still opened statement..
EDIT2
if( m_isConnected && connectionAlive == SQL_CD_TRUE )
{
ret = SQLDisconnect( m_hdbc );
if( ret != SQL_SUCCESS )
{
GetErrorMessage( errorMsg, 2 );
result = 1;
}
}
ret = SQLFreeHandle( SQL_HANDLE_DBC, m_hdbc );
if( ret != SQL_SUCCESS )
{
GetErrorMessage( errorMsg, 2 );
result = 1;
}
else
m_hdbc = 0;