p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

proasp_howto thread: RE: flexible search

Message #1 by "Ciano, Alberto (PS, NP)" <alberto.ciano@n...> on Sat, 3 Aug 2002 16:51:01 +0200

may be I am too easy in providing you an answer ... but neverthenless 

did you try to use the following sintax in your query statment ?

     "SELECT ... FROM .... WHERE .. =3D'%" & <your value> &"%'"


-----Original Message-----
From: dfalconer@g... [mailto:dfalconer@g...]
Sent: venerd=EC 26 luglio 2002 18.33
To: Pro ASP HowTo
Subject: [proasp_howto] flexible search

At present my search engine searches through a colum of keywords in an 
database. The keywords are divided by semicolons (;). At the moment the 

code used to search through the keywords is a like statement. Problem 
it only picks up exact phrases.

For instance if the keywords in a record were:
great teams; usa; scotland team

if the person searched for 'great teams' they would get a result if 
serached for 'great teams usa' then no result, now i could fix this by
taking out the semi-colons.

However this wouldnt fix the problem that if someone entered team 
they would get a result but if the entered scotland team they would. I
basically want all the words in the keyword colum to be searchable
individually unless the person wraps the entry in a "". I have tried to 

use the CONTAINS predicate but get and ODBC error. Any ideas on 
a more flexible search system.

  Return to Index