Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Occasionally hanging on a table with buffering
Message
De
19/01/2008 10:35:48
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
19/01/2008 10:29:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01283131
Message ID:
01283242
Vues:
19
>Cetin --
>
>Ahhh, I was turning on buffering MUCH later ... I'll try it in LOAD.
>
>Seems odd that the timing would matter, but I assume that's because I don't understand the mechanics.

Of course, you would have to turn on buffering before the user even starts editing.

As to the "mechanics" - the basic idea is that Visual FoxPro keeps two copies of the record:

1. the value before the user started changing. This can be checked with oldval(...). Also, Visual FoxPro uses this value to check if there is an update conflict, i.e., another user changing the record after you started editing. (The value is compared with the value in the database itself, which can be obtained with curval(...)).

2. The value of the record, changed by the user in memory. This is the value accessed directly, with TableName.FieldName, or through the ControlSource of a TextBox or similar object.

If this sounds a little complicated, there is no reason to worry for now; but just remember to turn buffering on at the beginning, might be in Form.Load(), and don't change it again later.
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