I'm using a Microsoft ODBC Driver. When I try to execute multiple EXEC commands and create cursor objects, the first cursor object gets created but the subsequent cursor object creation fails:
%conn_odbc : connection to a ODBC datasource
conn_odbc=database('database_name','username',password)%query : Any select query
query = 'SELECT * from <table_name> '%Cursor objects
cursor_odbc_first = exec(conn_odbc,query)cursor_odbc_second= exec(conn_odbc,query)
As in the above example when I try to execute multiple SELECT queries using the EXEC command in Database Toolbox, the first cursor object is created, but the second cursor object creation fails with the following error message:
“[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt”
Where as with JDBC driver the multiple cursor objects are created.
Best Answer