Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


SQL Error: No SQL Cursors remaining

SQL Error: No SQL Cursors remaining

SQL Error: No SQL Cursors remaining

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.

RE: SQL Error: No SQL Cursors remaining

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.

RE: SQL Error: No SQL Cursors remaining

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.


RE: SQL Error: No SQL Cursors remaining

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...

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close