INFO: Alternative to SCATTER and GATHER in the New VFP Model (129641)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
- Microsoft Visual FoxPro for Windows 5.0
- Microsoft Visual FoxPro for Windows 6.0
- Microsoft Visual FoxPro for Macintosh 3.0b
This article was previously published under Q129641 SUMMARY
In FoxPro versions 2.x, many developers used the SCATTER and GATHER
commands to edit data in memory variables. These commands allowed the
developer to verify the contents of each field before placing the data in
the .DBF file, and resolved some record locking issues.
Visual FoxPro has added a data buffering feature that can be used as an
alternative approach to using SCATTER and GATHER in your programs. Data
buffering provides the following benefits to you as a developer:
- When you use buffering, you can automatically access the validation
rules for fields and records that have been entered into the data base
container. When you use memory variables, you cannot automatically
access these rules.
- You can determine when a record is locked (prior to editing, or after
editing and before saving) to handle contention for record locks in a
multiuser environment. In this respect, the buffering features
eliminate the need for READ NOLOCK.
- Table buffering allows you to save edits for multiple records in memory
at the same time. For example, you can keep all of the line items for an
invoice in memory and write them at one time if the user chooses to save
the invoice.
- Visual FoxPro provides several new functions to assist you in applying
or discarding updates to a table, and in verifying data integrity in a
multiuser environment.
REFERENCES
Refer to the Visual FoxPro "Professional Features Guide" and "Developers
Guide" for more information on buffering and developing forms.
For additional information on setting buffering in your application, please
see the following article in the Microsoft Knowledge Base:
128205 HOWTO: Set Buffering Mode in Visual FoxPro
Modification Type: | Major | Last Reviewed: | 12/1/2003 |
---|
Keywords: | kbinfo KB129641 |
---|
|