Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Field name != variable name?
Message
 
 
À
21/05/1998 01:59:51
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00100420
Message ID:
00102101
Vues:
28
>Hi Michelle,
>It's normal behaviour in FP (all versions AFAIK). If the same variable name exist in the table that's open in current workarea then table fieldname takes precedence. To avoid it you must alias the memvar with "m.".
* Some tests here
>* Table mytable has fields clname and cfname
>clname = "aaaaaa"
>cfname = "bbbbbb"
>use mytable
>select 0    && Change workarea
>? clname,cfname    && Prints "aaa.." and "bb.."
>select mytable
>? clname,cfname    && Prints field values
>? m.clname,m.cfname    && Prints "aaa.." and "bb.."
Cetin


Sigh. Everyone seems to be missing the point. Or does it seem to be such an obvous question that no one is actually reading what I'm saying?

The variable name and the field name are _NOT_ the same. If it was, this would be a no brainer. One is "lname" and one is "clname".

Sorry if I sound cross. I'm just getting a bit frustrated.

Thanks,
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform