Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Gather memvar not working for long field names
Message
De
08/08/2002 22:38:45
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
06/08/2002 01:35:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00686236
Message ID:
00687815
Vues:
45
>>>Thanks for the tip. The issue was not with scatter/gather. I have a routine that exports data in the form of a free table. I use a SELECT-Sql to create my free table. That is truncating my field names to 10 charachters. SO when I go to scatter/gather, they arent getting populated, the field names dont match up. The exported table needs to remain free.
>>>
>>>Any solutions, other than renaming all my fields?
>>
>>The oldest version of Scatter/Gather: scatter to laArray Memo. It will create an array and then the Gather From laArray Memo will fill your fields by position, regardless of names. This position dependence is what made it not so useful, so most probably everyone forgot about it, but I think it's still there and should work.
>
>** INEXPERIENCED DEVELOPER ADVISES **
>Free tables cannot have "long" field names. You must either rename them to the proper size applicable to free tables, or construct your SQL statement so as to create a temporary database into which you can place a table that will accept your "long" field names. At this point you can populate the table as needed.
>
>Finally you can export the file within the temporary DBC onto a free table with the field names reset to the proper length.
>
>Makes sense?

1. does
2. sql is not really necessary, you can use the Database clause of the Copy statement to automatically choose (but not create, unfortuneately) the temp database
3. with scatter to array, you don't care about any of this. First field gets scattered into the first element of the array, nth into nth, so as long as you don't forget the Memo keyword and the structures match sufficiently (i.e. you don't get "data type mismatch"), you don't need to know anything about the names.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform