var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: fetch out of sequence error
I am getting 'ORA-01002 fetch out of sequence error', when trying to excecute a procedure.
The Procedure looks lik this:
cursor c1 is
For rec in c1
call to new procedure B
where B does either a commit or rollback on every call to procedure B
The procedures has no compilation error, but when excuting throws this --
'ORA-01002 fetch out of sequence' error.
I tried to search info about this error, but al I got was that such an error occurs when cursor has a for update with commit or rollback in between fetch.
My cursor is specifically a select cursor with no fpr update but it makes call to a procedure which in turn performs commit or rollback.
Im unable to solve this error, plz help
Does "procedure B" have to commit (or rollback), unconditionally? Why wouldn't you COMMIT once, after the END LOOP statement in "procedure A"?
Yes, Procedure B need Commit evrytime it is invoked
Other than making procedure B an autonomous transaction, is ther any other way out?
That depends. You have explained why procedure B must commit (or rollback) each time is is called. Maybe if it just rolled back to a savepoint you wouldn't need the commit?
Originally Posted by GRReddy