Re: Cursor locking
Date: 26 Mar 1999 07:00:30 GMT
Message-ID: <7dfbae$c8k$1_at_nntp.csufresno.edu>
In article <7ddprj$n2j$1_at_nnrp1.dejanews.com>,
Peter Mckenzie <Peter.McKenzie_at_health.wa.gov.au> wrote:
<snip>
>Somewhere in Feuerstein's ORACLE PL/SQL book he says close your cursor to
>release locks. Elsewhere he says Commit or Rollback. This is what started me
>thinking. A programmer might open a cursor for update but make no updates as
>a result of some logic within his 'for' loop. He might think that because no
>updates where made no commit is required and just close the cursor. I would
>have hoped that provided no updates were made the cursor close would do the
>trick - but according to you the commit is always required.
I couldn't believe it, so I went looking, and there it is on page 166: "When you close a cursor... any locks caused by the cursor are removed." Hmmm... wonder what he meant.
But later in the book, on page 177, he correctly writes that rows are locked until Commit or Rollback.
Steve Cosner
Steve Cosner Received on Fri Mar 26 1999 - 08:00:30 CET