If your using buffering, VFP handles the locking for you. All you have to do is choose a buffering scheme. The most secure is pessimistic buffering, where the first person editing a record gets the lock. However, doing this you run the risk of a person starting an edit, then going to lunch and locking everyone out.
The preferred approach is optimistic locking, where a lock is attempted when you try to commit a change. In this scheme, the lock is only held for the duration of the update. You also run the risk of someone comitting a change while your editing, thus invaliding your edit. In this case you need to implement a conflict resolution scheme. There are examples in the programmers guide.
Charlie
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement