General information
Title:
RE: Private datasessions....check for lo
X400-Originator: RAMONEEM@mail.aramco.com.sa
X400-MTS-Identifier: [/PRMD=ARAMCO/ADMD=ATTMAIL/C=SA/;0016300002104385000002]
J
jun
>The client wishes to use pessimistic buffering. A first for me as I'm
used to optimistic. Anyway, I need the best method for determining when
a
record is locked by another user. I can see in the "find" method and
checking when retrieved from disk, great, set all the controls to read
only. As I understand pessimistic locking, the lock does not take effect
until "EDITING" has happened. This tells me that 2 different users could
retrieve the same record; user 1 retrieves, user 2 retrieves before user
1
has started editing and a lock is obtained. (Maybe user 1 got up and went
somewhere) So now I've got two users with what appears to be valid
records
prepared for editing except that neither is yet locked. (User 1 comes
back) User 1 presses a key and gets a lock, what's the best way to check
for the lock to let user 2 that someone beat them to it? User 2 thinks
they've got an unlocked record and suddenly it blows up.
>
>Steve
Steve,
An ON ERROR trap that handles the Record Is In Use error that occurs when
user 2 tries to edit.
BTW, are you aware that you can provide a pessimistic approach to
contention management with optimisitic buffering?
[Ramoneda, Jun] I'm still feeling my way around VFP; what's the best way
to implement this?
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only