Re: Cursor locking
Date: Wed, 24 Mar 1999 14:08:21 +0100
Message-ID: <Rw5K2.176$dk3.845_at_news1.online.no>
Peter Mckenzie wrote in message <7dan12$vda$1_at_nnrp1.dejanews.com>...
>I declare a cursor for update.I open it - are the records locked ?I close
>it - are the records unlocked ?I open it and update a recordI close it -
>are the records unlocked ?I open itI commit (nothing to commit)are the
>records unlocked ?I open itI fetchI updateI commitAre the records
>unlocked ?I close it
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
[Quoted] Open a cursor for update, and the records are locked.
Unlock them with commit or rollback (and nothing else), after which you may not fetch (ORA-01002 fetch out of sequence) from that cursor anymore (unless it's closed and then opened again). Hence, you might as well close it before commit/rollback, just to keep your code tidy.
Regards,
Roy Brokvam
roy.brokvam_at_conax.com
Received on Wed Mar 24 1999 - 14:08:21 CET