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 -> Invalid Cursor (corrected)

Invalid Cursor (corrected)

From: Georg Scholz <georgscholz_at_gmail.com>
Date: Wed, 14 Nov 2007 02:11:18 -0800
Message-ID: <1195035078.489396.312290@v3g2000hsg.googlegroups.com>


Hello,

I had two typos in my post yesterday, so here again:

I am getting the error "invalid cursor" --- I have spent hours on this, I have no clue.

I am calling a procedure from a remote database, which is linked via a
database link.
The procedure is declared as follows:

CREATE OR REPLACE PACKAGE Pkg_Reports
AS
TYPE refcur IS REF CURSOR;
  PROCEDURE GetReport (rep OUT refcur, v_startDate IN DATE);  END Pkg_Reports;
/

PROCEDURE GetReport (rep OUT refcur, v_startDate IN DATE); IS
BEGIN
        OPEN rep FOR SELECT .... ;
END;
/

I am calling the procedure as follows:

CREATE OR REPLACE procedure PROC_TEST
as

        c PKG_REPORTS.refcur_at_mylink

        v1 varchar2(8);
        v2 varchar2(20);
        v3 number;

begin
  PKG_REPORTS.GerReport_at_mylink(c, sysdate);     if c%ISOPEN THEN
      loop
        fetch c into  v1, v2, v3;   -- <-- RUN-TIME ERROR
      end loop;

    end if;
end;
/

Everything is compiling fine. The cursor is open. The variables have correct types.
But still I am getting a runtime error "Invalid cursor" in the line marked above. What am I doing wrong?

We are using Oracle 9.2.0.8.

Any help is highly appreciated.

Thank you in advance
Georg Scholz Received on Wed Nov 14 2007 - 04:11:18 CST

Original text of this message

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