Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Lock
Message
From
17/09/2002 15:22:45
 
General information
Forum:
Visual FoxPro
Category:
CodeMine
Title:
Re: Lock
Miscellaneous
Thread ID:
00701397
Message ID:
00701463
Views:
20
Mr Ivan:

>Just came from Fox26, so my users are used to get a message telling them there's someone else already editing that record, and even the user name that has it. So, they won't get to a point where they've edited all the fields of the form, just to be told that things have changed, and what they want to do now.
>
>Is there something in our framework to prevent this ?
>
>Best.

The behaviour that you may be trying to emulate (from Fox26) could be achieved by setting the cursor to pessimistic record locking. This will lock the record for the duration of the edit. However, this is at the VFP level. The framework will handle the numerous situations as it find them as dictated by your buffering schema, but the behaviour is dictated by how you buffer the cursor.

FWIW, this type of locking schema is IMHO draconian. Given the fantastic buffering capabilities of VFP, most developers I assume would generally use optimistic table locks. When you have potential contention, you can avoid the update, or write code that highlights which field have been changed by the other user. Then, the current user can decide whether or not he/she should proceed with the current update. It may be that the current user has changed fields that will not overwrite the other users changes - in otherwords to users may have updated different parts of the same record that in effect cause no conflict.

HTH

Best
-=Gary
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform