Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Very basic question about the Update of data
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00621075
Message ID:
00627367
Vues:
10
>Can you please give a brief example of buffering, say when I've selected a record and presented to the user on a form for editing, what's the syntax for commiting the edit/update to the table, or reverting to the original data?
>
>TIA

Randy,

Once buffering is set up you use TableUpdate() to post changes to the table and TableRevert() to revert the user's changes back to what they were before the edit. So the code in the Click event of a Save Button might something like;
IF TheDataIsValid
   IF NOT TableUpdate(1,.F.,"TheAlias")
       Do somet hing about the update failing
   ENDIF
ELSE
   Tell the user there is a problem with the data
ENDIF
And in the Cancel button;
TableRevert(.T.,"TheAlias")
Thisform.Refresh()
Be sure to read the help file on both TableUpdate and TableRevert to understand what the arguments are for.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform