Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can you modify the structure of a table programmatically
Message
 
To
07/01/1999 10:58:53
Ernie Veniegas
Micro System Solutions, Inc.
Calistoga, California, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00173544
Message ID:
00173558
Views:
18
>Is it possible to modify a table programmatically with the run-time version of VFP? I have an EXE out there and I need to add some fields to one of the the users table. Could I do this programmatically? For example, use the table, determine if the field already exists, and if not, add the field(s). Can this be done? Also, what happens to the database container behind the scenes? Will the runtime version of VFP also maintain the container? Same question for creating an index programmatically.
>
>Any help appreciated ... thanks in advance.

Hi Ernie,

What you could do is use the AFIELDS() function to get the current structure, modify the resulting array (adding fields, changing, etc.). Append in from the original table, then use COPY TO...to overwrite the original. I'd suggest that you use COPY FILE... to make a backup copy JIC.

hth,
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform