Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: invalid rowid on cursor for update
Hi,
in case you issue commit or rollback somewhere between for ... loop /end loop or open/close, it is nothing strange that you get invalid rowid. Avoid issuing commit/rollback in this way. Workaround is change for update cursor to simple and add rowid to select list, then issue explicit dml statment. Fo exemple,
...
cursor c is select ..., rowid from my_tab where ...;
...
begin
...
for r in c loop
...
update my_tab set aa=bb,... where rowid=r.rowid;
...
commit;
end loop;
...
For more details, check "Server Application Developer's Guide"
Sincerely,
Ivars Grinbergs
Received on Tue Nov 04 1997 - 00:00:00 CST
![]() |
![]() |