Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADD and DROP Columns in a free table
Message
From
13/08/2003 18:40:00
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
13/08/2003 18:14:22
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00819961
Message ID:
00819969
Views:
10
>Using ALTER TABLE I know, but if the table is not in a database how do I check if the column exists before I DROP or ADD it? In a database I would use INDBC() but not sure how to do the same on free tables. Thanks!
>
>Regards, Renoir

Pressumably, what you want to is update the database structure at the client site or something similar.

I believe the following approach would make things much simpler:

You can do all changes to your database structure in an empty copy (zero records in all tables), and have an update program that basically copies the empty structure to a temporary location, and there does an APPEND FROM for each table.

To avoid update triggers, you can either: 1) make sure you copy all parent tables before the child tables, or 2) disable RI temporarily.

I have previously used approach (1), but now I use approach (2) (using TaxRI instead of the standard RI-builder).

If you detect that a table is not changed, you can copy the entire table instead of doing the APPEND FROM. This is optional, but it will speed things up considerably. (There are several things to be checked.)

HTH,

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform