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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Cursor Guru Question.......

Re: Cursor Guru Question.......

From: Sybrand Bakker <postmaster_at_sybrandb.demon.nl>
Date: Thu, 21 Oct 1999 23:14:55 +0200
Message-ID: <940540519.24458.0.pluto.d4ee154e@news.demon.nl>


You need to use a REF CURSOR to do this.

Hth,

--
Sybrand Bakker, Oracle DBA
<scott-k_at_usa.net> wrote in message news:7unsv7$jd4$1_at_nnrp1.deja.com...
>
>
> I have a requirement to return cursors from my Procedures. Now, this
> works fine if all I have is simple selects, but unfortunately, I do
> not. I need to be able to return calculated values and values from
> other SP's in these cursors. The following SP code fits half of my
> needs.
>
> PROCEDURE sp_Test2
> (Cur IN OUT genCurType)
>
> IS
> stest1 varchar(20);
> stest3 varchar(20);
>
> BEGIN
>
> stest1 :='Test 1';
> stest3 :='Test 3;
>
> open Cur for select stest1, 'stest2', stest3, EMPTY_BLOB() from
> dual;
>
> end sp_Test2;
>
> This code returns my variables in a cursor that contains three columns,
> and one row. Now, the hard part, How can I return multiple rows in this
> cursor? In VB, I can dim an ADO recordset, define the fields, load it
> up with as much data as I please, and then do what ever I need. Is it
> possible to create a cursor, load it up with as many rows and cols as I
> need?
>
> Thanks in advance.
>
> Please reply to scott-k_at_usa.net
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Thu Oct 21 1999 - 16:14:55 CDT

Original text of this message

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