Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / Oracle / Oracle Server / November 2005

Tip: Looking for answers? Try searching our database.

Can i explicitly close all open cursors for a given SID?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Edwinah63 - 30 Nov 2005 05:04 GMT
i have an old VB6 application that has recently had the drivers changed
from Microsoft provider for Oracle (MSDAORA) to Oracle provider for OLE
DB (OraOLEDB.Oracle) for CLOB support on certain tables.

unfortunately, we now get the "ORA-01000 maximum open cursors
exceeded", a problem we never had with the old driver.

checking the number of open cursors for a given session shows that they
are accumulating instead of being extinguished!!!

eg:

rs.open "select * from myTable"

//do something with recordset

rs.close 'Nothing happens!!!! cursor remains open on server :(

have googled around and found the most common solution is to simply
close the connection, but in this apps case, the connection is OPENED
ONCE and kept alive for the duration of the life of the session.

what we have:

* windows 2000
* VB 6
* ADO 2.5
* Oracle ole db provider 8.17
* database set to dedicated connections, not shared pool.
* Oracle 9.2 patch set 5

what would like to do:

* would prefer not to close connections after each transaction due to
large-ish code rewrite
* if possible would like to programatically tell Oracle to close all
open cursors for the given session. code sample please
* would newer drivers fix this problem?

any help greatly appreciated

Edwinah63
Frank van Bortel - 30 Nov 2005 11:50 GMT
> i have an old VB6 application that has recently had the drivers changed
> from Microsoft provider for Oracle (MSDAORA) to Oracle provider for OLE
[quoted text clipped - 38 lines]
>
> Edwinah63

Try %isopen for the (named) cursor - no need to open
an open cursor. Same technique applies to closing:
if [cursor_name]%ISOPEN then close [cursor_name];

Signature

Regards,
Frank van Bortel

Top-posting is one way to shut me up...

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.