-
When I use Cursor , inside the cursor loop , I am using
when current of syntax . My question is Can I use commit
after it ?
-
After the loop - yes, inside the loop - NO.
If you use WHERE CURRENT OF you had to open the cursor with the FOR UPDATE clause and this locks all rows selected by this cursor. COMMIT releases all locks and you get the error "fetch out of sequence" after subsequent fetch.
There was a bug up to 816 (I think) that prevented Oracle to report the error in this case so all seemed to be OK.
Ales
-
Hi,
if you use commit inside the loop then the cursor will get closed.
Regards,
-
Also if ur performing huge dml activity commiting and then fetching again from with in the loop would result in "snap shot too" old error if your rollback segment is not configured properly.So take care whilc commiting with in the loop.
regards
anandkl
anandkl
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|