Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maximum Open Cursors Exceeded ?? - HELP 1

Status
Not open for further replies.

krpd

Programmer
Jan 17, 2001
6
0
0
US

Hi,

I am working on a VB - Oracle application. I get this error "Maximum Open Cursors Exceeded", when ever i query for different records more than 25-30 times. Since this is a multiuser App. I am using a DYNAMIC cursor for all operations and a STATIC cursor for display only. ( - basically opening ADO Recordsets thru code)

I am not sure how to CLOSE a cursor, or does it implicitly get closed in
VB when the RECORDSET is closed or SET equal to NOTHING ??

How do i know whether a cursor is Closed or not ??

Please help ...

Prabhu Dev
 
Dont know if this will help, but try it! :)

Code:
set rs = con.execute(sql)

do while not rs.eof
   ...
next

rs.close
set rs = nothing

set rs = new adodb.recordset

Good Luck
-Mats
 

Hi,
Mats,

Thank You for the reply,

I am doing the same thing, however the error occurs. Is there anything i need to do at the backend, to ensure the Cursor is closed(destroyed) after the query is completed ??

Prabhu Dev
 
Nope.
Just close the recordset, then set the variable to nothing. ADO/OLEDB/Whatever should then release the cursor.

Hmmm. Have you tried (as an experiment) forward-only cursors?

Chip H.
 
Are you using the same connection object for all your recordsets?
If not, do so. This may be a problem with to many connections to the same DB. (One connection object can sustain many recordsets.)

Good Luck
-Mats
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top