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 -> Re: Invalid Cursor - why ?

Re: Invalid Cursor - why ?

From: Georg Scholz <georgscholz_at_gmail.com>
Date: Tue, 13 Nov 2007 13:15:40 -0800
Message-ID: <1194988540.209516.67920@o38g2000hse.googlegroups.com>


On 13 Nov., 21:01, Ben <bal..._at_comcast.net> wrote:
> On Nov 13, 2:40 pm, Georg Scholz <georgsch..._at_gmail.com> wrote:
>
>
>
>
>
> > Hello,
>
> > 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, c3; -- <-- 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
> > v1 varchar2(8;
>
> v1 is missing a right paren in the definition of it. whether or not
> this is a typo when posting or if it exists in your code, dunno.- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -

No, this is a typo when posting. It is not the cause for the error! Do you have any other ideas?

Georg Received on Tue Nov 13 2007 - 15:15:40 CST

Original text of this message

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