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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Error: No SQL Cursors remaining 2

Status
Not open for further replies.

wfkaylor

Programmer
Jan 26, 2005
2
0
0
US
I am running centura 2.1 using an oracle database
Client 8.17

The users are getting this error a couple of time a day.
I had the DBA check the oracle cursors open and they were way below the limit.
Any help would be appreciated.

 
Maybe you need to do an audit and see if handles are being disconnected after use, or the same SqlConnect() is being called repeatedly with no SqlDisconnect(). If you are using a class to manage Sql handles - check its working properly. A good idea is to have a class that re-compiles old connected Sql Handles for re-use rather than uses a new one. Try and avoid using SqlImmediate(), replace it with SqlConnect() SqlPrepareAndExecute() and then SqlDisconnect()

I can send you a class to manage Sql Handles if you like and try it out - but it may require lots of work to plug into your app., but have never had any probs with Sql cursors, so it must be working Ok. Only ever used it on Oracle7.3, Sqlbase, Informix and SqlServer though. It maybe an Oracle8 thing.

 
Hi Steve,
I opened a ticket with GUPTA.
They told me that I should follow every SqlImmediate
with a sqlClearImmediate.
Do you agree with this.

Thanks,
Bill
 
Hello Bill
I guess I would never use SqlImmediate() in the first place. If you are using it, you have no control over the cursor, so you do need to use SqlClearImmediate() which may help the problem.. but I think better style is to use a Sql Handle class as described above, or SqlConnect() and SqlPrepareAndExecute() etc. lemme know if want a class to manage your handles...

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top