Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Alter Table
Message
From
04/03/2004 02:44:46
 
 
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:
00882998
Views:
21
>I somehow copied the wrong table into the release of my software. doh
>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??
>
>Thanks
>
>Paul

Paul,

I am not a "guru" in this area, and this seems *fundamental* enough to warrant expert advice. I hesitate to hand out advice, just my opinions.

If you USE Database.DBC SHARED NOUP and browse, you can see it stores the field definitions there. DBGETPROP() will pull information from here. If you issue a VALIDATE DATABASE, you'll get errors. I doubt if you can even USE the table if the fields are drastically different, less do an ALTER TABLE.

If the app has not run, perhaps I would just copy the DBF over on top of the wrong one. As far as the database definition has not been altered to fit the wrong table fields by some background DB engine process (which I do not know does or does not happen), I think it sounds safe to do just that. However, what if the app has run? There may be records in other tables with references to the affected table.

AFIELDS() can be used to retrieve a list of fields from the table itself if it is open.

Perhaps in my case I would feel safe to redeploy a virgin set of data which is correct.
Kenneth.
Previous
Reply
Map
View

Click here to load this message in the networking platform