Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP Networking
Message
De
19/07/2001 11:04:49
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
19/07/2001 09:52:27
Ransome So
Ransome's Workshop
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00532406
Message ID:
00532584
Vues:
12
>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)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform