Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to set "Enable Closing Cursors" in Oracle OLE DB driver?

212669Feb 4 2003 — edited Feb 18 2003
Server 8.0.5
Client 8.1.7
OLE DB Provider 8.1.7.3
VB6
ADO/MDAC 2.5

I've written a VB6 app that works with a number of DBMS (SQL Server, Access, MSDE, Oracle). I'm using the Oracle OLE DB driver 8.1.7.3. I do a fair amount of closing and reopening the same ADODB.Recordset object to run a new query.

I have observed that I run out of cursors after about 20 queries or so (MAX CURSORS EXCEEDED ORA-0100). Setting the OPEN_CURSORS=200 parameter on the server (8.0.5) in INITORCL.ORA allows me to do a lot more queries. (But also eats up a lot of memory on the client, seems to be ~2Mb per).

There is a "Enable Closing Cursors" check box in the ODBC configure screen, does anyone know how I can set this directly on the Oracle OLE DB provider? A connection string parameter?

For reference, my connection string is:

Provider=OraOLEDB.Oracle;UserID=xxx;Password=yyy;Data Source=Net8ServiceName;

For reference, the code I use to close and requery is quite simple:

Private Sub DoQuery(rs As ADODB.Recordset, sql As String)

With rs
.Close
.Open sql, glbldbs, adOpenKeyset, adLockOptimistic
End With

End Sub

Thanks in advance for any other ideas or suggestions.

-- David Drucker
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 18 2003
Added on Feb 4 2003
1 comment
657 views