Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scatter
Message
De
19/07/1997 02:11:19
Chiang Jeffrey
Paramoun Air Sea Svcs P/L
Singapore, Singapour
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00040596
Message ID:
00040723
Vues:
37
>>I am new to Visual Foxpro and used to program in Foxpro2.6
Thanks,....but when do I issue TABLEUPDATE() and TAABLEREVERT()?...should I put them the the 'click' event of the command buttons that I created for save and delete?


>>
>>I noticed one thing,..I can't seem to use scatter memvar in the forms,...how can I go about writing mem var before wirting to disk?
>>
>>somebody pls help?
>>
>>Jeff
>Jeff,
>
>Everyone else has pointed you to data buffering whihc is the VFP way of doing things. In asnwer to your question, the reason your scatter code is not working propely for you has to do with the scoping of the variables. Variables are private when created by scatter and private memvars go away as soon as the routine that created them ends. If you scatter in the form's Init event, when that event is over and it returns all of the variables disappear from memory.
>
>This is one of the reasons that data buffereing is so much better. With data buffering you turn it on by setting the BufferModeOverride property of each table in the form's data enviornment. The you make you controls bound directly to the fields in the table. because of teh buffering the changes to those controls will not be posted to disk until you issue a TableUpdate() call to tell VFP to post to disk. If you decide that you want to discard the changes you issue a TableRevert() call and that throws the buffered changes away.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform