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: Closing cursors after leaving them open.

Re: Closing cursors after leaving them open.

From: Daniel A. Morgan <damorgan_at_exesolutions.com>
Date: Wed, 23 Jan 2002 20:26:12 +0000
Message-ID: <3C4F1C63.4F7C81DE@exesolutions.com>


DECLARE CURSOR xyz IS

   blah blah blah;

BEGIN
   OPEN xyz;
   do some stuff;
   CLOSE xyz;
END;
/

Oh BTW ... did you actually try to find the answer in an Oracle book or were you just guessing at the syntax?

Daniel Morgan

Galen Boyer wrote:

> When I open but don't close a cursor in pl/sql code, and then I
> try to open it again, I, of course, get cursor still open.
>
> How do I tell Oracle through sqlplus to close that currently open
> cursor?
>
> I've tried:
>
> sqlplus> close c1;
>
> sqlplus> close cursor c1;
>
> sqlplus> declare
> sqlplus> cursor c1 as blah;
> sqlplus> begin
> sqlplus> close c1;
> sqlplus> end;
> sqlplus> /
>
> sqlplus> begin
> sqlplus> close c1;
> sqlplus> end;
> sqlplus> /
>
> --
> Galen deForest Boyer
> Sweet dreams and flying machines in pieces on the ground.
Received on Wed Jan 23 2002 - 14:26:12 CST

Original text of this message

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