Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detecting field presence in dbf
Message
 
 
To
02/08/2007 11:11:20
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01244177
Message ID:
01245505
Views:
22
>>> 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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform