Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> ORA-01001
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;
END;
/
Received on Wed Aug 21 2002 - 14:38:35 CDT
![]() |
![]() |