Oracle cursors still opened after DataSet.Close

cadotp

Member
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.
 
Does this mean "CloseAll" should be used whenever a query is not going to be reused, thereby saving resources on the server?
 
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
 
Back
Top