Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Alter Table
Message
De
04/03/2004 07:49:56
 
 
À
04/03/2004 00:00:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00882985
Message ID:
00883033
Vues:
9
>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??


You could use Alter Table to modify instead of copying a new table if you know the existing table may already have records you don't want to lose. It will also preserve integrity of DBC.

To check for missing fields you could do:
Use MyTable Exclusive
If Fsize("MyField") = 0
   Alter Table MyTable Add Column MyField C(10)
Endif


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform