Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Verify if a field already exists in a table
Message
 
 
To
18/06/2009 14:15:53
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01238247
Message ID:
01406953
Views:
43
>>Programmatically? AFAIK, no.
>>
>>>Is there any other way to change the structure of the existing table?
>
>Yes -- there is another way. I used it years ago:
>
>use the COPY STRUCTURE EXTENDED command to create a table of the fields. Then add/delete fields as appropriate. Then use CREATE FROM command to create a new table from the COPY STRUCTURE EXTENDED table. Now you have to populate the new table from the original table. This is not as elegant as the ALTER TABLE command, but it was an "old" way to modify the structure of tables.
>
>The COPY STRUCTURE EXTENDED command could also be used to test for the existence of a field as well...

I thought about it, but it would be a new table, not the change in the same.
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