Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to use varible name add fields to a table?
Message
 
 
À
15/10/2002 01:14:02
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00711196
Message ID:
00711275
Vues:
9
I also showed how to do that w/o using macro substitution. :)

>Michale
>
>> I have a table need to add fields to a exact number? How can I do it? The following code have error ,How to change it?
>
>To add to Sergey's correct reply that fieldnames cannot begin with a number, here is a way to do this.
>
>
LOCAL lni, lcFld
>CREATE TABLE Temp (Field1 N(8))
>FOR lni = FCOUNT("TEMP") + 1 TO 38
>	lcFld = "Field" + LTRIM(STR(lni,2))
>	ALTER TABLE Temp ADD COLUMN &lcFld N(8)
>NEXT lni
>BROWSE
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform