Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding a fieldname to a cursor programatically
Message
From
18/12/2003 15:06:52
 
 
To
18/12/2003 14:43:54
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00860481
Message ID:
00860496
Views:
14
Make sure the variable value isn't numeric and doesn't start with a number, (also, try using a named expression instead of the macro)
e.g.
** if startyr is numeric
startyrCol = "_"+Alltrim(Str(startyr))
alter table curheadscompare add column (startyrCol) n(8) null
>Hi all,
>
>I intend to add new fields to a cursor programatically, using a variable value as the field name. The value of the variable, of course, keeps on changing. My problem is that the code below does not read the value of the variable (startyr), and I get an error message.
>
>ALTER TABLE curheadscompare ADD COLUMN &startyr n(8) null
>
>Any solutions, anybody ?
>
>Thanks.
>
>Regards,
>
>Steve
Insanity: Doing the same thing over and over and expecting different results.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform