Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can you modify the structure of a table programmatically
Message
 
À
07/01/1999 10:58:53
Ernie Veniegas
Micro System Solutions, Inc.
Calistoga, Californie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00173544
Message ID:
00173558
Vues:
19
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform