Print Thread
Oracle cursors still opened after DataSet.Close
#542 05/16/00 09:53 PM
Joined: Jan 2000
Posts: 9
France
C
cadotp Offline OP
Member
OP Offline
Member
C
Joined: Jan 2000
Posts: 9
France
Context: Windows 95b - Delphi4 UP3 - DOA 3.3.3 - Oracle 8.1.6

When I close my dataset (using Close method or setting Active property to False), Oracle cursor associated to dataset query stay opened. I can see that Oracle cursor is still opened when I query v$open_cursor view.

How can I close (free) Oracle cursor ?

Thanks a lot.

Re: Oracle cursors still opened after DataSet.Close
#543 05/17/00 05:39 AM
Joined: Feb 2000
Posts: 3
Crozet, VA, USA
P
Member
Offline
Member
P
Joined: Feb 2000
Posts: 3
Crozet, VA, USA
You must use the method closeall to close associated cursors on database.

Re: Oracle cursors still opened after DataSet.Close
#544 05/17/00 08:38 AM
Joined: Jan 2000
Posts: 14
BC, Canada
J
Member
Offline
Member
J
Joined: Jan 2000
Posts: 14
BC, Canada
Does this mean "CloseAll" should be used whenever a query is not going to be reused, thereby saving resources on the server?

Re: Oracle cursors still opened after DataSet.Close
#545 05/18/00 04:43 AM
Joined: Feb 2000
Posts: 3
Crozet, VA, USA
P
Member
Offline
Member
P
Joined: Feb 2000
Posts: 3
Crozet, VA, USA
As far as I have been able to demonstrate this appears to be the case. I have been monitoring v$open_cursor while debugging my application to monitor the opening (and closing) of cursors on the server. CloseAll will release the cursors for TOracleDataSet and Close will release the cursor for any SQL statement / PL/SQL code for TOracleQuery.

Interestingly enough TOracleQuery.Close will also close any reference cursors you may be using on the server.

Hope this helps - I am still trying to get a grasp on the behavior of TOraclePackage - I will let you know.

Jason


Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.025s Queries: 13 (0.008s) Memory: 2.5119 MB (Peak: 3.0427 MB) Data Comp: Off Server Time: 2024-05-17 06:25:18 UTC
Valid HTML 5 and Valid CSS