setting a ref cursor to existing open cursor

From: joe seefeldt <jseefeldt_at_nlvl.com>
Date: 1998/01/21
Message-ID: <34C61E33.2C5271A4_at_nlvl.com>#1/1


Using Netsacpe Livewire to hit an Oracle 8.x database. The Java SS LiveWire DB layer needs a ref cursor defined as an in out parameter in a stored procedure.

Question: Is ther a way to open a cursor and then set a reference to it? The documentation suggests defining the
Record Type and Ref Cursor type and then opening the ref cursor in the SP:



TYPE recOutString IS
 RECORD
 (vVal1 varchar2(255));

TYPE rRecOutString is REF CURSOR RETURN recOutString;

FUNCTION get_something(rCur_io IN OUT rRecOutString) RETURN INTEGER
IS

    ... blah blah ...
    OPEN rCur_io
    FOR
        SELECT a lot of stuff FROM some table



I would like to open the cursor, check the ROWCOUNT, and return a value accordingly.

Thanks,
Joe Seefeldt
jseefeldt_at_nlvl.com Received on Wed Jan 21 1998 - 00:00:00 CET

Original text of this message