Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do you add fields to a database?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00068403
Message ID:
00068411
Views:
31
Check out the ALTER TABLE command. This is actually much easier than creating a new table and appending from the original.

Josh

>Back in the old FoxPro 2.6 times, I had a program which was able to add fields to any existing DBF; if the structure of the DBF wasn´t what the program wanted, it created a new file, appended everything from the old DBF, added indexes to the new file, deleted the old one, and renamed the new one (whew!).
>
>Now... how do you do this when you use database containers (DBCs)? If you change just the DBFs, the DBC doesn´t change; if you bring over a new DBC, VFP protests that the DBFs do not match. The standard GENDBC program is great for creating a DBC and its DBFs for the first time, but it doesn´t work when they already exist.
>
>When I add new functions to existing systems, sometimes I must add new fields to existing DBFs. My goal is to be able to give an user a program and tell him "Run such-or-such and all your tables will be updated".
>
>Any ideas?
>
>Thanks!
Previous
Reply
Map
View

Click here to load this message in the networking platform