Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
This is what I need, please help ....it does not works !
Message
 
 
To
10/07/2000 10:06:47
Norman Avila
Universal Computadora Guatemala, S.A.
Guatemala, Guatemala
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00390194
Message ID:
00390200
Views:
12
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform