Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Table name in a variable syntax issue
Message
De
19/09/2012 08:56:14
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
18/09/2012 13:59:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01553159
Message ID:
01553202
Vues:
79
>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?

Assuming you know the field name, once the table is open you can access it with its alias, as if that were the table name. Oh, and I would suggest to open new tables in area zero - let Visual FoxPro choose an empty area automatically.

For example:
USE (m.TableToUse) ALIAS MyTable IN 0
...
? MyTable.SomeField
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform