DA Search not finding exact phrases
I've recently implemented DA search on a site and it works except for exact phrases.
For instance, if I search using "Light Jungle", the results return an empty recordset even though that phrase is in the database.
If I search using Light Jungle I get every record that has Light or Jungle in it.
If I search using Light, Jungle I get every record that has Light and Jungle in it.
I have implemented DA Search many times before and not had this problem.
Using ASP VB and MS-SQL.
Here is the code from the results page:
<%
'WA Database Search (Copyright 2005, WebAssist.com)
'Recordset: rsRuleBook;
'Searchpage: ASL.asp;
'Form: frmSearch;
dim WADbSearch1_DefaultWhere
WADbSearch1_DefaultWhere = ""
if (cStr(Request.Form("WADbSearch1")) <> "") then
dim WADbSearch1_whereClause, WADbSearch1_dateSeparator, WADbSearch1_wildCard
WADbSearch1_wildCard = "%"
WADbSearch1_dateSeparator = "'"
if ("SQL SERVER" = "ACCESS") then
WADbSearch1_dateSeparator="#"
end if
if ("SQL SERVER" = "ORACLE") then
WADbSearch1_dateSeparator="TO_DATE('"
end if
if ("SQL SERVER" = "MYSQL") then
WADbSearch1_dateSeparator="MYSQL"""
end if
'keyword array declarations
Dim WADbSearch1_KeyArr0
WADbSearch1_KeyArr0 = Array("Chapter","RuleNum","RuleCopy")
'comparison list additions
WADbSearch1_whereClause=BuildKeyword(WADbSearch1_KeyArr0,"" & cStr(Request.Form("SearchBox")) & "","","Includes",",%20","%20","%22","%22",0,WADbSearch1_wildCard,WADbSearch1_dateSeparator,WADbSearch1_whereClause)
if (1 = 1) then
Session("WADbSearch1_ASLRB_Searched")=WADbSearch1_whereClause
end if
else
if (1 = 1) then
if (cStr(Session("WADbSearch1_ASLRB_Searched")) <> "") then
WADbSearch1_whereClause = cStr(Session("WADbSearch1_ASLRB_Searched"))
else
WADbSearch1_whereClause = WADbSearch1_DefaultWhere
end if
else
WADbSearch1_whereClause = WADbSearch1_DefaultWhere
end if
end if
%>
What is the problem?
Any help much appreciated!