Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update conflict problem
Message
De
16/09/1999 14:01:51
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00265546
Message ID:
00265572
Vues:
17
>I have some forms with private data session and optimistic record buffering. When the user do a modification on screen and it is not tableupdate()'ed, if another user change the record, the save of the user that is doing the on screen modification fail with an Update conflict message.
>
>I thought that optimistic record buffering will overwrite the record with the last modification.
>
>What is wrong? How should I handle this? Can I just trap the error in the error handling procedure and continue?
>
>Thanks
>Eric.

You can use the force option in the TABLEUPDATE() function to force the update. But what I generally do try TABLEUPDATE() with no force and test for success. If not successful I query the AERROR() array for more info. If the update failed due to a user conflict I either ( depending on the requirements ) bail out of the update and TABLEREVERT() or notify the user and let them decide if they want to everwrite the other user's changes. if so, then TABLEUPDATE() with the force option.

Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform