En fait j'ai cette requete :
Si Request("nomchamp") est de type numérique, ça marche alors que s'il est de type texte ça ne marche pas, je m'explique : ds le cas d'un champs numérique, si j'affiche strSql2 ça donne :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 strSql2 = "select * from " & strTable & " where " & Request("nomchamp") & " = " & Request("recherche") objRS2.Open strSql2, objConn2, adLockOptimistic, adCmdTable
select * from Table1 where Champs5 = 1
Là il n'y a pas de problème, ms si mon champs est de type texte strSql2 m'affiche :
select * from Table1 where Champs5 = www.google.fr
alors q je voudrai qu'il m'affiche
select * from Table1 where Champs5 = "www.google.fr"
Comment faire ?
Merci bcp
Partager