Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding Fields To Tables
Message
From
30/10/2002 15:14:08
 
 
To
29/10/2002 01:29:48
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00716324
Message ID:
00717075
Views:
15
I use an external routine (FXP) to perform specialized functions such as these.

For example UpdatePerform.fxp. Your application, upon startup, will recognize the existance of the fxp and run it. Once complete, your application should delete the UpdatePerform.fxp.

The UpdatePerform.fxp will perform special "One-time" functions against the database. For instance, I never did like people with the lastname of "Jones", rename them all to "Smith". :-)


In your case:

1. It would open the selected table.
2. Use FSIZE() to determine if the field already exists
3. If it does not exist use ALTER TABLE to add the or change columns.
4. Delete any old indices that should not be there and add new ones.


In our apps, the existance of updateperform.fxp triggers an automatic process which will get exclusive access to the database container and call the validate database and reindex processes. One of these processes is to also compare the data dictionary to the existing tables and adjust when necessary.
Gordon de Rouyan
DC&G Consulting
Edmonton, Alberta
Email: derouyag@shaw.ca
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform