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

Re: Closing Cursors

From: Praetorian <morbius6_at_my-deja.com>
Date: 2000/06/06
Message-ID: <8hjhto$ele$1@nnrp1.deja.com>#1/1

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_at_nnrp1.deja.com>,   ddf_dba_at_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_at_nnrp1.deja.com>,
> Praetorian <morbius6_at_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. Received on Tue Jun 06 2000 - 00:00:00 CDT

Original text of this message

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