Re: How to find out if a record is locked?

From: Steve Cosner <stevec_at_zimmer.csufresno.edu>
Date: 1996/10/16
Message-ID: <5438bd$m7u_at_shadow.CSUFresno.EDU>#1/1


In article <1996Oct14.233826.23033_at_van.oz.au>, Tim Nguyen <tim_at_van.oz.au> wrote:
>Hi world,
>When I insert/update a record in the DB server from Forms, is there
>any way the server can tell me that the record is currently locked?

When you insert a record, it can't be locked, because it doesn't exist on the server.

When you attempt to update or delete a record that is locked, it depends on how you have your locking mode block property set. If it is set to Immediate (the default), as soon as you make one keystroke on any item in the record, you get a pop-up alert that says:   Could not reserve record (n tries). Keep trying? The server returns ORA-00054 for this condition.

If locking mode is set to delayed, nothing happens until you try to commit. At this point, your form (and your entire client machine--at least on Windows 3.1) locks up. It stays locked up as long as the record is locked (THANK YOU, Bill and Larry!). The only way to get loose from this problem is to reboot.

You can experience all this yourself using PO7 and Forms by creating a default-block form and running two sessions of it at the same time.

Regards,
Steve Cosner Received on Wed Oct 16 1996 - 00:00:00 CEST

Original text of this message