Home » SQL & PL/SQL » SQL & PL/SQL » PL/SQL error message "ORA-01023: Cursor context not found "
PL/SQL error message "ORA-01023: Cursor context not found " [message #2346] Mon, 08 July 2002 11:56 Go to next message
Hari Velugoti
Messages: 2
Registered: July 2002
Junior Member
Hi all,

I am getting this error message when running my program. This is the background :

I have a dynamic sql running. Within the sql_fetch I have another EXEC SQL block (that does a simple INSERT). There is no problem the very first time.
I retrieve data from my dynamic sql fetch and insert it in a table. However, the second time around I get the following error ""ORA-01023: Cursor context not found (Invalid cursor number)".

I am using ProC here. We have another module wherein the same Dynamic SQL and SQL block work fine. Any pointers on what could be wrong ?

Thanks in advance.
Hari
Re: PL/SQL error message "ORA-01023: Cursor context not found " [message #2347 is a reply to message #2346] Mon, 08 July 2002 12:13 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Try using the precompiler options hold_cursor=no and release_cursor=yes.
This will force the precompiler to reparse at open cursor time
Re: PL/SQL error message "ORA-01023: Cursor context not found " [message #2349 is a reply to message #2347] Mon, 08 July 2002 14:07 Go to previous message
Hari Velugoti
Messages: 2
Registered: July 2002
Junior Member
Thank you for your input. By adding the following
command to my pl/sql file I am able to open both cursors (dynamic and explicit) at the same time.

EXEC ORACLE OPTION( RELEASE_CURSOR = YES );
Previous Topic: Re: Read a directory!
Next Topic: Type Permissions
Goto Forum:
  


Current Time: Wed Apr 24 09:38:07 CDT 2024