Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Limitation in SQL syntax ?
Message
 
To
10/12/2009 00:58:42
Hee Lim Wang
Fantasy Software Enterprise
Malaysia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01438325
Message ID:
01438355
Views:
56
>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 + ")")
Previous
Reply
Map
View

Click here to load this message in the networking platform