Re: Locking outside COMMIT WORK
Posted in 1996
In <3251409F.6A4E@explorer.csc.com> "Chao Y. Din" <cdin@explorer.csc.com> writes:
>> set isolation to repeatable read>> select 'sql statement' into temp temp_table
>Sorry, I don't understand this part.
I use a "select into temp with repeatable read" rather than a "cursor with
hold for update" because I believe that the cursor will only read and
lock the rows as each one is accessed in turn. The select into temp
should read (and lock via the repeatable read) the entire set of rows all
at one time. This method is the therefore the numero uno method for the
lazy man (ie me) to get all the locks I need.
If anyone can confirm or deny this belief, please do so. If I've got it
backwards or something, I've got a shitload of recoding to do in the
coming weeks :)
>There is a possible solution. Check out Informix Guide to SQL:
>Tutorial, Chapter 7, Section: Hold Cursor. As far as I know this is the
>only way to hold a cursor when committing a transaction.
I dont think will help me, as the problem I have is with holding the locks,
not holding the cursor open. My rows are always selected via the temp
table (indirectly). The cursor option is a go-er if I have to reopen (and
reread) the rows after each commit work in order to pick up the locks again.
Bryan Tonnet
batonnet@zeta.org.au