Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update conflicts
Message
From
20/07/2001 16:23:53
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
20/07/2001 16:17:20
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00533337
Message ID:
00533342
Views:
16
>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)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform