Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding a fieldname to a cursor programatically
Message
De
18/12/2003 15:06:52
 
 
À
18/12/2003 14:43:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00860481
Message ID:
00860496
Vues:
15
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform