Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Table name in a variable syntax issue
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01553159
Message ID:
01553165
Vues:
60
>>I have a need to access some tables using:
>>
>>USE (m.TableTo Use) IN 1
>>
>>I am trying refer to a field in the table this way:
>>
>>Variable = (m.TableToUse).fieldname  && Is not working for me.
>>Variable = (m.TableToUse.fieldname)  && Is also not working for me.
>>
>>How is it done, please?
>
>
>First you should be using an alias, then a macro, execscript or STORE
>
>
>USE (m.TableTo Use) IN 1 ALIAS myTable
>STORE Evaluate("myTable.fieldName") TO Variable
>
Sorry I didn't follow the whole thread, but why you have EVALUATE?
This is enough:
USE (m.TableTo Use) IN 1 ALIAS myTable
STORE myTable.fieldName TO Variable 
** or
Variable = myTable.fieldName
That is the whole point of the ALIAS, to name it :-)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform