Re: Commit without freeing locks

From: Timo Nykanen <timo.nykanen_at_avancer.telebox.fi>
Date: 1996/10/08
Message-ID: <325A89BD.B7D_at_avancer.telebox.fi>#1/1


Dieter Oberkofler wrote:
>
> My application uses a select for update in order to lock a specific
> row when this row needs to be modified by the user.
> After the user confirms its changes with the OK button i use the
> regular oracle commit command to commit all the changes and to free
> all the locked rows.
> If the user need to switch to other information that resides in
> another table and decides to modify this information i have the
> following problem: the commit of this nested transaction also
> frees the original locked row.

Clumsy fix: add locking column to each table that needs this kind of asynchronous locking. When you lock a row, set this column to show "busy", and remember which rows in which tables you have locked. Then if you get a "busy" row, locked by someone else, do not touch it. (Yes, implement a manual concurrency control, and hope that other users of these tables do not ignore it.)

Regards,
Timo Received on Tue Oct 08 1996 - 00:00:00 CEST

Original text of this message