Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Still SCATTER-brained...
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00438500
Message ID:
00438636
Vues:
18
>I must have a mental block when it comes to SCATTER/GATHER.
>
>Here's my code:
>SELECT TABLE1
>SCATTER NAME oTable1 MEMO
>
>How do I define oTable1 and populate it? I thought SCATTER would automatically make oTable1 and stick the table field values into the object for me. But I guess not. I tried making oTable1 a Public Variable, but that isn't right either.
>
>I used to SCATTER MEMVAR MEMO which works for me, but not when I do back to back SCATTER MEMVAR MEMO commands as in:
>SELECT TABLE1
>SCATTER MEMVAR MEMO
>SELECT TABLE2
>SCATTER MEMVAR MEMO
>I now see and understand why this is a nO-nO!
>
>Please help with oTable1. This can't be all that difficult. Can it? I must be making it worse than it is. Do I have to do a loop to fill the object?
>
>Thanks so much. It's hard to teach an old mainframe programming dog new tricks! LOL!
Two quick thoughts.
Are you sure that the current record is neither EOF nor completely blank. Just as in SCATTER MEMVAR, it is the current record that is scattered.
You do realize that as an object the way you reference the variables in oTable1 is like this oTable1.name_of_field_from_table
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform