Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: What's the meaning of OPEN_CURSOR?

Re: What's the meaning of OPEN_CURSOR?

From: allen lucas <alucus_at_concentric.net>
Date: 1998/01/21
Message-ID: <34C60B7D.69@concentric.net>#1/1

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?

-- 

===================================================================
\\||// The ballparks have gotten too crowded. / \ That's why nobody goes to see the game anymore." []--[] Yogi Berra NY Yankees @ /\ @ {----} ^^ alucus_at_concentric.net
===================================================================
Received on Wed Jan 21 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US