Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Field Existence
Message
From
03/05/2001 09:36:15
 
 
To
03/05/2001 09:10:26
David Brunelle
Université de Sherbrooke
Sherbrooke, Quebec, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00502953
Message ID:
00502972
Views:
16
This message has been marked as the solution to the initial question of the thread.
>Is there a way to verify if a field exist or not. I need this to make sure I don't try to add or remove twice the same field...

If the table is in a DBC, you can check without ever opening the table with
Set Database To mydatabase
llFieldExists = INDBC("mytable.myfield", "Field")
For any type of table
USE mytable
llFieldExists = FSize("myfield")>0

** or

llFieldExists = FSize("myfield", "mytableAlias")>0
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