| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Recursion and cursor name - ORA-01002 fetch out of sequence
Hello,
in a function that gets called recursively a cursor will be opened and fetched. When entering the function a second time the cursor can be opened and fetched without any warning or error message. After returning to the calling function I try to fetch the next record, but Oracle claims "ORA-01002 fetch out of sequence" - the cursor state is invalid or closed.
What can I do to recursively call a function that needs database access via a cursor? Is there a way to use a dynamic cursor name?
Any input welcome,
--
Dietmar Leibecke
![]() |
![]() |