Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
This is what I need, please help ....it does not works !
Message
 
 
À
10/07/2000 10:06:47
Norman Avila
Universal Computadora Guatemala, S.A.
Guatemala, Guatemala
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00390194
Message ID:
00390200
Vues:
11
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform