ORA-1002 When Fetching A Ref Cursor
Last updated on JULY 05, 2017
Applies to:Precompilers - Version 184.108.40.206 and later
Information in this document applies to any platform.
***Checked for relevance on 14th Jul 2016***
In Pro*C program, calling a Stored Procedure/Function with an OUT ref cursor parameter using the "EXEC SQL CALL func(:refcur);" format returns an invalid ref cursor variable, resulting in a subsequent FETCH failing with ORA-01002 "fetch out of sequence".
If the anonymous block format is used instead, this works ok:
EXEC SQL EXECUTE
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms