Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: What's the meaning of OPEN_CURSOR?
I have taken an interest in this thread as I have had this problem in the recent past.
I have developers establishing packages with procedures which open cursors. In shorthand, the layout is as follows:
Create or replace package pckg_item_type as procedure sp_r_mr_last_update(last_update_P out date); end pckg_item_type;
create or replace package body pckg_item_type as
procedure sp_r_mr_last_update(last_update_p out date) as
icon_Date date;
item_type_assoc_date date;
Begin
Declare
Cursor c1 is select max(last_update) from display_icon;
cursor c2 is select max(last_update) from item_type_display_icon;
Begin
open c1;
fetch c1 into icon_date;
close c1;
open c2;
fetch c2 into item_type_association_date;
close c2;
if icon_date > item_type_association_date then
last_update_p := icon_date;
else
last_update_p := item_type_association_date;
end if;
end;
end sp_r_mr_last_update;
end pckg_item_type;
The problem we are experiencing is this close does not seem to be occurring. It appears the cursor remains open for the duration of session. We temporarily solved by upping the open_cursor count, but would like to understand the cursors procedure better.
Any ideas?
--Received on Wed Jan 21 1998 - 00:00:00 CST
===================================================================
\\||// The ballparks have gotten too crowded. / \ That's why nobody goes to see the game anymore." []--[] Yogi Berra NY Yankees @ /\ @ {----} ^^ alucus_at_concentric.net
===================================================================