Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLEXEC - SELECT too long
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows XP
Network:
Windows XP
Database:
MySQL
Miscellaneous
Thread ID:
01101988
Message ID:
01102024
Views:
21
>Try putting your SQL statement into a variable first.
>
>
lcSQL = 'SELECT rub_code,rub_libelle,rub_alias,;
> rub_touche,trub_libelle,rub_etat,;
> ser_code,trub_code FROM Rubrique Rubrique INNER JOIN Typerubrique Typerubrique;
> ON Rubrique.trub_code=Typerubrique.trub_code;
> WHERE ser_code=?Cser and SUBSTR(rub_libelle,1,3) NOT IN("acc","ind")','Cursdetail')'
>SQLEXEC(gnConnHandle,lcSQL)


She can use TEXT TO and she can also make it shorter (although it is not too long in this example):
lcSQL = 'SELECT rub_code,rub_libelle,rub_alias,;
 rub_touche,trub_libelle,rub_etat,;
 ser_code,trub_code FROM Rubrique RU INNER JOIN Typerubrique TR;
 ON RU.trub_code=TR.trub_code;
 WHERE ser_code=?Cser and SUBSTR(rub_libelle,1,3) NOT IN("acc","ind")','Cursdetail')'
SQLEXEC(gnConnHandle,lcSQL)


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Previous
Reply
Map
View

Click here to load this message in the networking platform