>select codpro,nombre,color from prod where nombre like ('%seachparam1%')+'%' and color like ('%searchparam2%')+'%'
>DOES NOT WORKS
>
>the ... +'%' is just to avoid the user to enter it on the search form
You should construct your SQL like:
local lcSQL
lcSQL = "select codpro,nombre,color from prod ";
+ "where nombre like '%" + chrtran(searchparam1, '%', '') + "%'" ;
+ " and color like '%" + chrtran(searchparam2, '%', '') + "%'"
Then use macro expansion to execute it:
&lcSQL
Or if using SQLExec:
SQLExec(lnHandle, lcSQL, 'crsResults')
Mark McCasland
Midlothian, TX USA