Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is there a function to check whether a field exist in tb
Message
 
 
À
08/03/2002 11:10:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00629929
Message ID:
00630259
Vues:
25
>OOPS ...
>Correction: varType(myfield) correctly returns a U when 'myfield' field is non existent.

This is not a reliable check, because you may have variable myField defined...
vartype(MyTable.myField) would generate an error, as Marcia pointed out... So, type('MyTable.myField') is the correct solution if your table is a free table. Otherwise INDBC() function could be used instead.
If it's not broken, fix it until it is.


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

Click here to load this message in the networking platform