Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Limitation in SQL syntax ?
Message
 
À
10/12/2009 00:58:42
Hee Lim Wang
Fantasy Software Enterprise
Malaisie
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01438325
Message ID:
01438355
Vues:
55
>I don't use reserved VFP keywords as field name even reserved mySQL keywords
>It works if I split into a few statement with the same field names
>
>
>
>Could the problem be in the names of the fields (some of the field names you're using are reserved VFP keywords)?

Lim,

The problem is the allowed length of a string literal in VFP. Split your code up like below
lcFields = "user, password, supervisor, duty,M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16,M17,M18,M19,M20,M21,M22,M23,M24,M25,M26"
lcValues = ['TEST','123456','Y','Y','','','','','','','','','','','','','','','','','','','','','','','','','','']
SQLExec(lnHandle, "insert into user (" + lcFields + ") values (" + lcValues + ")")
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform