From: Praetorian <morbius6@my-deja.com>
Subject: Re: Closing Cursors
Date: 2000/06/06
Message-ID: <8hjhto$ele$1@nnrp1.deja.com>#1/1
References: <8hj4g0$3cs$1@nnrp1.deja.com> <8hjeoc$c6h$1@nnrp1.deja.com>
X-Http-Proxy: 1.0 dfw-gate2.raytheon.com:8080 (Squid/2.2.STABLE5), 1.0 x60.deja.com:80 (Squid/1.1.22) for client 147.24.111.219, 138.126.255.194
Organization: Deja.com - Before you buy.
X-Article-Creation-Date: Tue Jun 06 19:03:33 2000 GMT
X-MyDeja-Info: XMYDJUIDmorbius6
Newsgroups: comp.databases.oracle.server
X-Http-User-Agent: Mozilla/4.61 [en]C-CCK-MCD CSC;Raytheon (WinNT; U)


Unfortunately, while this closes the cursor reliably on the server side,
it causes the client application which called the procedure to lose its
result set.

I'm assuming that the termination of the procedure does not
automatically close the cursor (if not included as a statement in the
proc).

Thanks for responding.



In article <8hjeoc$c6h$1@nnrp1.deja.com>,
  ddf_dba@my-deja.com wrote:
> It is best to close the cursor as the last step before the procedure
> exits.  Just before the final "exit;" in the procedure put the
 following
> code:
>
>      close <cursor_name>;
>
> where <cursor_name> is the name of the open cursor in the PL/SQL
> block.  This will close the cursor when you are finished with it,
 after
> the fetch loop exits but just before the procedure terminates.
>
> David Fitzjarrell
> Oracle DBA
>
> In article <8hj4g0$3cs$1@nnrp1.deja.com>,
>   Praetorian <morbius6@my-deja.com> wrote:
> > Is it necessary to close a cursor in the code of a procedure, or
 does
> > the cursor close when the procedure completes?
> >
> > I am calling a stored procedure from Visual Basic with ADO 2.5. I
 need
> > the cursor open in order to retrieve the results set, but I don't
 want
> > to leave the cursor open indefinitely on the server side.
> >
> > Thanks.
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
> >
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>


Sent via Deja.com http://www.deja.com/
Before you buy.


