Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update Conflicts -- Real or Imagined...
Message
De
28/07/2004 12:03:02
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
28/07/2004 11:55:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00928743
Message ID:
00928762
Vues:
16
>Hilmar,
>
>Yes, I use buffering, Optimistic Record Buffering.
>
>I use the EDIT button, because the application requires security on different fields.
>
>It is rare that two different people will EDIT a record. But it is not rare that two people will look at the same record, or one person EDIT and the other person VIEW the same record.
>
>The problem is that who ever moves the record pointer last leaves the record as they saw it.

How is that? If the user views a record, it should not be necessary to follow this by a TableUpdate().

OTOH, I think that an implicit TableUpdate() can be performed if there are changes, and you move to another record.

Methinks that if there is a possibility that the user made changes, before moving to another record, you should check if there are changes (GetFldState()), and then ask the user if he wants to save. If not, do a TableRevert().

Also, don't use the "force update" option with TableUpdate(), since that is too dangerous. If another user saved first, just inform this fact, and do the TableRevert().
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
Répondre
Fil
Voir

Click here to load this message in the networking platform