[thelist] Wordsearch in ASP/Access
David.Cantrell at Gunter.AF.mil
David.Cantrell at Gunter.AF.mil
Mon Sep 30 14:50:01 CDT 2002
>For example, if someone types in the word
>"Linux" I want every entry with the word Linux in it to be returned.
If everything is going into a database, then you can just run a wildcard
("%") query:
dim sSql : sSql = "select * from table"
dim sTerm : sTerm = Request.Querystring( "searchterm" )
If Len( Trim( sTerm ) ) > 0 then
sSql = sSql & " where fieldname like '%" & sTerm & "%'"
End If
'...execute sSql, get recordset, convert to xml, pipe through xsl...
:)
HTH,
-dave
More information about the thelist
mailing list