when current of
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: when current of

  1. #1
    Join Date
    Aug 2000
    Location
    Shanghai
    Posts
    433
    When I use Cursor , inside the cursor loop , I am using
    when current of syntax . My question is Can I use commit
    after it ?



  2. #2
    Join Date
    Apr 2001
    Location
    Czechia
    Posts
    712
    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

  3. #3
    Join Date
    Aug 2001
    Posts
    36
    Hi,

    if you use commit inside the loop then the cursor will get closed.

    Regards,

  4. #4
    Join Date
    Aug 2001
    Location
    chennai,bangalore
    Posts
    840
    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
  •  


Click Here to Expand Forum to Full Width