Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Field exists?
Message
De
13/01/2008 10:24:46
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01281442
Message ID:
01281451
Vues:
8
>? VARTYPE (CONFIG2.version)
>
>returns C
>
>? VARTYPE (CONFIG2.versionxxx)
>
>return an error message
>
>
>Is it the right way ?
>I was expecting something as .F.

TYPE() and VARTYPE() return the variable or field type or a "U" is it does not exist.
IF VARTYPE( MyFile.MyField ) <> "U" && it exists

or

IF TYPE( "MyFile.MyField" ) <> "U"  && it exists
Or you can test if the field exists and has the expected type:
IF TYPE( "MyFile.MyField" ) = "C"  && if the field is a char
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform