Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Check if Field exists in a table
Message
From
30/03/2001 13:28:03
 
 
To
30/03/2001 12:43:44
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00490373
Message ID:
00490383
Views:
12
>VFP 6.0 sp4.. How can I programmitically check a table to see if a field exists and then get the fieldtype,fieldwidth,precision property.
>
>TIA
>Rob

1)
llExists = FSIZE("myfield", "mytable")>0

2) (only if using dbc)
llExists = INDBC("mytable.myfield", "Field")

option 2) is especially good for determining if a field exists
before running a SQL statement containing that field, w/o having to open up the table first.
Insanity: Doing the same thing over and over and expecting different results.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform