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 -> How to make use of the data in a cursor returned from a stored

How to make use of the data in a cursor returned from a stored

From: wing <wingwong_at_witty.com>
Date: 31 Jul 2002 18:10:38 -0700
Message-ID: <873e96d6.0207311710.7a522e87@posting.google.com>


Hi,

I am new to oracle stored procedure.

I have written a stored procedure which returns a cursor. I am trying to write a corresponding test program to verify the cursor output.

The stored procedure is
PackClientCashLedger.GetCashLedgerRecord(ioSeverity, ioErrorMsg, cur, '0001');
which cur is the returned cursor with firm_id as one of the field.

The testing program is as follows,

declare
cur types.cursortype;
c varchar2(4000);
ioSeverity varchar2(20);
ioErrorMsg varchar2(20);

begin
  dbms_output.enable(1000000);
  PackClientCashLedger.GetCashLedgerRecord(ioSeverity, ioErrorMsg, cur, '0001');

    for cur_rec in cur

      loop
        dbms_ouput.put_line(cur_rec.firm_id);	
      end loop;

end;
/

which returns the error when ran,
ERROR at line 13:

ORA-06550: line 13, column 17:
PLS-00221: 'CUR' is not a procedure or is undefined
ORA-06550: line 13, column 2:

PL/SQL: Statement ignored

Thanks in advance for any input,

Wing Received on Wed Jul 31 2002 - 20:10:38 CDT

Original text of this message

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