Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP Networking
Message
From
19/07/2001 11:04:49
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
19/07/2001 09:52:27
Ransome So
Ransome's Workshop
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00532406
Message ID:
00532584
Views:
13
>Dear Hilmar,
>
>Thank you for your suggested scenoria of the worst thing would happen.
>Do you agreed that I am not a careful programmer,if I ignore the conflict and implement no solving problem program segments. As there is only 2 user working on !!!
>
>With regards,
>
>Ransome

That's right. You need the something similar to the following pseudocode:
* For one record at a time:
if not TableUpdate() && single record, or all records? Check help for details
  MessageBox("Could not update record.")
  * See also aerror(), for more details.
  * Update can fail because of update conflict, or violation of some rule.
  if <the error is an update conflict, error number 1585
    TableRevert()
  endif
endif
If you are working with several tables, and you want to save "all or nothing", use transactions. See: BEGIN TRANSACTION, END TRANSACTION, ROLLBACK.

Hilmar.
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