Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Problem closing cursors

Problem closing cursors

From: Hugh Pendry <hpendry_at_trinitech.co.uk>
Date: Tue, 22 Feb 2000 10:44:10 -0000
Message-ID: <88tp9r$hd0$1@trinitech.demon.co.uk>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US