Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Closing Cursors and ODBC (How To?)
Hugh,
Does this open cursor problem occur when you use the call sequence of:
SQLAllocStmt()
SQLExecDirect()
SQLFetch() // in a loop
SQLFreeStmt()
?
Rock.
In article <890h2f$se$1_at_trinitech.demon.co.uk>,
"Hugh Pendry" <hpendry_at_trinitech.nospam.co.uk> wrote:
> Hi
>
> does anyone know how to close refcursors returned from
> an Oracle stored proc, they are returned via the ODBC API
> to a C++ program.
>
> Each time I call the stored proc each returned ref cursor creates
> one more entry in the view v$open_cursor. There a 5 refcursors
> so the first time I call the proc I have 5 open cursors, the second
> time there are 10 open cursors until eventually the number of cursors
> exceeds whatever the limit is for max open cursors.
>
> Whatever I do on the C++ side doesn't seem to close the cursors
> I've tried SQLCloseCursor, SQLFreeStmt and SQLEndTrans. They
> only seem to close when I end the session.
>
> Any ideas?
>
> Hugh
>
> (If replying direct please remove nospam from the address)
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Wed Feb 23 2000 - 06:57:44 CST
![]() |
![]() |