Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: invalid rowid on cursor for update

Re: invalid rowid on cursor for update

From: Ivars Grinbergs <ivarsg_at_itsystems.lv>
Date: 1997/11/04
Message-ID: <345EE48C.9CE40C91@itsystems.lv>#1/1

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US