Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Columns
Message
 
 
À
28/10/2002 15:02:30
Billy Bramhall
Interdirect Usa, Inc.
Houston, Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00716154
Message ID:
00716162
Vues:
20
You can use TYPE() function to check if field exists and ALTER TABLE command to add it if it doesn't. Something like
IF TYPE("mytable.myfield") = "U"
  ALTER TABLE mytable ADD COLUMN myfield C(10)
ENDIF
>Hello all,
>
>I need code that will do the following:
>
>1. Check to see if a column (field) exists in a table.
> 1a. If the column does exist, then exit.
> 1b. If the column does NOT exist, then add the column to the table.
>
>
>Any help will be appreciated.
>Thanks,
>Billy
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform