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 -> ORA-01001

ORA-01001

From: DC <DC_at_foo.com>
Date: Wed, 21 Aug 2002 21:38:35 +0200
Message-ID: <ak0q9a$1ep5g7$1@ID-87429.news.dfncis.de>

Hi, I'm working with 8i 8.1.6 on Windows 2000 Server.

I'm getting ORA-01001 error while trying to execute a stored procedure in SQL*Plus:

SQL> EXEC MY_FUNC(sysdate);
BEGIN MY_FUNC(sysdate); END;

*
ERROR at line 1:
ORA-01001: invalid cursor
ORA-06512: at "MAIN_USER.MY_FUNC", line 87

I also searched METALink. They recommend increasing AREASIZE and MAXOPENCURSORS. However I am using SQL*Plus. No precompilers here. What can I do? MAXOPENCURSORS and AREASIZE are mentioned only three (3) times in the whole Oracle8i documentation set, and even those entries are of little help.

CODE --------> (breaks at FETCH CUR_MYTABLE INTO REC_MYTABLE; line)

CREATE PROCEDURE MY_FUNC(TARGETDAY DATE) AS     CURSOR CUR_MYTABLE IS SELECT COL1, COL2, COL3 FROM MYTABLE;     REC_MYTABLE MYTABLE%ROWTYPE; BEGIN
    OPEN CUR_MYTABLE;
    LOOP

        FETCH CUR_MYTABLE INTO REC_MYTABLE;
        EXIT WHEN CUR_MYTABLE%NOTFOUND;

    CLOSE CUR_MYTABLE;
    END LOOP; EXCEPTION
    WHEN OTHERS THEN
        <exception processing>

END;
/ Received on Wed Aug 21 2002 - 14:38:35 CDT

Original text of this message

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