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 -> Cursor Guru Question.......

Cursor Guru Question.......

From: <scott-k_at_usa.net>
Date: Thu, 21 Oct 1999 20:27:23 GMT
Message-ID: <7unsv7$jd4$1@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 - 15:27:23 CDT

Original text of this message

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