Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best way to save a record
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00051462
Message ID:
00051527
Views:
29
>Is the best way to save a record entail first scattering the current record's data to memvar and editing the memvars or directly editing the live record?

Tim,

You really want to learn to make use of buffering. I use a form that can handle add, edit and deletes. For adding, I set the .ControlSource for each control on the form to "", let the user fill in the values and do an INSERT-SQL with the VALUES coming from the .Value property of each control. If a user selects a record for editing, I fill in the .ControlSource for each control, let the user edit or he/she may click the Delete button to delete the record. Clicking the Save button triggers the call to =TABLEUPDATE() which flushes the buffers and writes the record to disk. The delete button does something similar. The real issue here is that the buffering scheme for each table/view is set in the DataEnvironment of the form. I've never used SCATTER or GATHER since leaving the world of 2.6 and moving on to 3.0/5.0 as the buffer is the "memvar" to which the user is writing to.

Steve
Previous
Reply
Map
View

Click here to load this message in the networking platform