Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Alter Table
Message
From
04/03/2004 07:49:56
 
 
To
04/03/2004 00:00:44
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00882985
Message ID:
00883033
Views:
8
>of course it is missing a few fields. My question is if i just copy the new table would it mess up the DBC or should i have a routine to use alter table?
>
>If im using alter table what is the best way to check to see if the fields exist??


You could use Alter Table to modify instead of copying a new table if you know the existing table may already have records you don't want to lose. It will also preserve integrity of DBC.

To check for missing fields you could do:
Use MyTable Exclusive
If Fsize("MyField") = 0
   Alter Table MyTable Add Column MyField C(10)
Endif


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform