Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Problem closing cursors
I am calling a stored proc returning 5 result sets
from C++ via the ODBC API.
My problem is that after I run the stored proc a few times without ending the session I get the error message ORA-01000: maximum open cursors exceeded.
After running the stored proc I call SQLCloseCursor(hstmt) but then if I select from V$OPEN_CURSOR I can still see the 5 cursors open. If I then run the stored proc again I can see all of the five cursors now open twice. And so on until the maximum number of open cursors is hit.
Does anyone know how to close the cursors after each ODBC call to the stored proc. (I have tried calling SQLFreeStmt(hstmt, SQL_CLOSE) but this gives the same problem).
Between calls I only call SQLCloseCursor so that I don't have to rebind all the parameters.
Any ideas? Received on Tue Feb 22 2000 - 04:44:10 CST