Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update conflict problem
Message
From
16/09/1999 14:01:51
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00265546
Message ID:
00265572
Views:
16
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform