i think you are running into the 255 character limit of foxpro.
i always create my sql strings like this--
using your example :
text to lcsql noshow textmerge
SELECT userfname,userlname,ranchid FROM main_table.users
WHERE userid like <<alltrim(lcRanchUser)>>% and
password like <<alltrim(lcRanchPassWord)>> %
endtext
=sqlexec(xx, lcsql)
or
text to lcsql noshow textmerge
SELECT userfname,userlname,ranchid FROM main_table.users
WHERE userid = ?lcRanchUser and
password =?lcRanchPassWord
endtext
=sqlexec(xx, lcsql)
i dont think you need to trim anything or use the wildcard
there are many ways to do it.
also, i would think that mysql also will use standard sql parameters in
queries, although i cannot recall if i ever done so myself.
jay
Post by Richard StecenkoHow do you pass the value of the parameters to MySQL?
store "SELECT userfname,userlname,ranchid FROM main_table.users " +;
"WHERE userid like '" + alltrim(lcRanchUser) +"%' and ";
"password like '" +alltrim(lcRanchPassWord) +"%'" to dlcSqlExec
then either exec or prepare and execute.
For passwords and user names, I'd probably not use the % wild card,
but that's just an example.
Richard Stecenko
Interactive Computer Services Inc.
Winnipeg, Canada
204.453.2052