Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scatter
Message
 
To
18/07/1997 12:20:13
Chiang Jeffrey
Paramoun Air Sea Svcs P/L
Singapore, Singapore
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00040596
Message ID:
00040662
Views:
31
>I am new to Visual Foxpro and used to program in Foxpro2.6
>
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform