My Oracle Support Banner

PROC: Calling PL/SQL by Using REF CURSOR Via SQL_CURSOR Cause ORA-1000 (Doc ID 3013545.1)

Last updated on MARCH 28, 2024

Applies to:

Precompilers - Version 18.3.0.0.0 to 18.9.0.0.0 [Release 12.2]
Precompilers - Version 19.3.0.0.0 to 19.5.0.0.0 [Release 19]
Information in this document applies to any platform.

Symptoms

Pro*C/C++ application causes ORA-1000 or ORA-01002.

The application uses REF CURSOR repeatedly by calling PL/SQL
block with using sql_cursor variable like below:


EXEC SQL BEGIN DECLARE SECTION;
sql_cursor csrFind;
EXEC SQL END DECLARE SECTION;

EXEC SQL ALLOCATE :csrFind;

EXEC SQL EXECUTE
BEGIN
OPEN :csrFind FOR
SELECT APPNO, NAME FROM tblcurtest;
END;
END-EXEC;

EXEC SQL CLOSE :csrFind;
EXEC SQL FREE :csrFind;

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.