|Subject||Re: [firebird-support] How to lock a record and check locked or not.|
Thank you very much for your kind and detail answer.
----- Original Message -----
From: "Helen Borrie" <helebor@...>
Sent: Monday, September 08, 2003 2:13 PM
Subject: Re: [firebird-support] How to lock a record and check locked or
> At 12:55 PM 8/09/2003 +0900, you wrote:
> update thistable set yourPK=yourPK
> where yourPK = :yourPK
> Post this statement. If it fails, you know that another transaction has
> already either 1) done the same thing with this record and has the lock or
> b) another transaction has committed a version of this record that is
> than the version your user is looking at. If it succeeds, she can go
> and edit the record and, provided other applications have the same setup,
> they won't be able to "step on" her work.
To find failed or succeeded, Catch exception or not ?
Or other way to find ?
Once exception occured, IBX functions do not work at all.
(Displayed "lock conflict on no wait transaction" message)
Is there any good way to continue a program ?
> This is the only way in Firebird 1.0.3 that you can test whether the
> is locked and, if not, to lock it. However, pessimistic locking goes
> against the way Firebird is designed to work and shouldn't be used in
> situations where it doesn't matter if multiple transactions should happen
> to touch the same record.
> It would be worth asking at borland.public.delphi.interbasexpress on
> news://forums.borland.com, whether there is a version of IBX that
> implements pessimistic locking for you (as IBObjects does). It will make
> your task much simpler...
I checked news://forums.borland.com, but now delphi news was not at all.
many csharpbuilder news.