Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update conflicts
Message
De
20/07/2001 16:23:53
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
20/07/2001 16:17:20
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00533337
Message ID:
00533342
Vues:
15
>You're telling me that I have to do all that checking "manually", like those 2.6 days?
>
>Chuck
>
>>This is precisely the error checking that VFP does when you use optimistic buffering.
>>
>>If TableUpdate() fails for the second user, the program should issue TableRevert(), refresh the form, and the user should start editing again.

Indeed, you have to do some checking manually. Your program should look something like this:
if TableUpdate()
  MessageBox('Record saved successfully.')
else
  * Get error with aerror()
  If (update conflict)
    MessageBox("Update conflict - another user just edited the record.")
    TableRevert()
    ThisForm.Refresh()
endif
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform