Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scatter-Gather
Message
From
24/08/2000 13:27:25
 
 
To
24/08/2000 10:01:34
Jolene Dicks
Human Resources Development Canada
St. John's, Newfoundland, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00408721
Message ID:
00408865
Views:
10
>Hi there,
>
>I have a program that uses scatter/gather. When it gathers the records from a table, there are several fields that get overwritten in the table that the fields are being updated to. These fields don't exist in the table that I am appending from. Is there a way to omit certain fields from being gathered when using that method. I know that I can gather only certain fields, but is there a way to omit certain fields also.
>

Using a cursor is my first choice, but SCATTER accepts a skeleton for fields for inclusion or exclusion (FIELDS LIKE/EXCEPT), and I use SCATTER NAME to scatter to an object, and GATHER NAME so that memvar issues don't arise; controlling the scope of data scattered, and passing the related values is a lot simpler; since the record is contained in one object, and we can have several sets of record data dpresent at one time using multiple objects or an array of objects. GATHER NAME also allows FIELDS LIKE/EXCEPT skeletons masks.

You may also want to look at SCATTER TO ARRAY or doing a SELECT with an array target; there is a disadvantage in that the order of fields is significant, you can use APPEND FROM ARRAY or GATHER FROM ARRAY or INSERT INTO..FROM ARRAY, and you can explicitly ADEL() rows or columns once extracted to eliminate specific fields, but the field reference is by index rather than name.

I tend to use SCATTER NAME...APPEND BLANK...GATHER NAME and build an array of object refs if I need multiple record images, and using a cursor won't work/can't be used.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform