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 -> Re: Closing Cursors and ODBC (How To?)

Re: Closing Cursors and ODBC (How To?)

From: <rock_cogar_at_my-deja.com>
Date: Wed, 23 Feb 2000 12:57:44 GMT
Message-ID: <890lg7$npj$1@nnrp1.deja.com>


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

Original text of this message

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