Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detecting field presence in dbf
Message
 
 
À
02/08/2007 11:11:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01244177
Message ID:
01245505
Vues:
24
>>> llCheck = vartype(AAA.kyWarrant)<>'U'
>>
>>If the field does not exist, vartype() throws an error rather than returns 'U'.
>>
>>Ben
>
>This is an old bug.
>
>try:
>
>  llCheck = vartype(kyWarrant)<>'U'
>
Hi Fabio,

You probably didn't read the whole discussion. Using vartype(kyWarrant) <> 'U' would not tell us, if kyWarrant is a field in a table or a variable.

Of course, it may be a moot point if we use some good naming convention, but it should be kept in mind.

Also if the table we're checking is not the currently selected alias, this check would not be helpful.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform