Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use varible name add fields to a table?
Message
 
 
To
15/10/2002 01:14:02
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00711196
Message ID:
00711275
Views:
8
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform