% Dim strSearch, strType, strSearchError, strTypeError, SQLstr, arrEmptyFlag, strProcess 'on Error Resume Next strSearch = Request.Form("searchstr") strType = Request.Form("searchtype") strProcess = Request.Form("process") strSearchError = 0 strTypeError = 0 DateError = 0 if strSearch = "" then strSearchError = 2 end if if strType = "" then strTypeError = 2 end if if strProcess <> 1 then strSearchError = 1 strTypeError = 1 end if if strType = "date" then a = InStr(1,strSearch,"/") b = InStrRev(strSearch,"/") if a = b then DateError = 1 end if end if if strType = "issueno" then if not IsNumeric(strSearch) then strSearchError = 2 end if end if if strTypeError = 0 and strSearchError = 0 and DateError = 0 then %><% if strType = "keyword" then SQLstr = "SELECT VolumeNo,IssueNo FROM Newsletters WHERE Text LIKE '%" & strSearch & "%' ORDER BY IssueNo" elseif strType = "issueno" then SQLstr = "SELECT VolumeNo,IssueNo FROM Archives WHERE IssueNo =" & strSearch & " ORDER BY IssueNo" elseif strType = "date" then SQLstr = "SELECT VolumeNo,IssueNo FROM Archives WHERE Date = #" & strSearch & "# ORDER BY IssueNo" end if 'Response.Write SQLstr objRS.Open SQLstr,objConn,1 if not objRS.EOF then arrSearchResults = objRS.GetRows() else arrEmptyFlag = 1 end if objRS.Close if arrEmptyFlag <> 1 then Response.Write "Search returned " & (ubound(arrSearchResults,2) + 1) & " result(s)." for i = 0 to ubound(arrSearchResults,2) %>