I have a form submitting to a processing page with the following fields
FirstName
LastName
Company
I'm trying to search all fields if the user has either filled all fields all left some blank. I don't know the syntax on how to do the search
<%
set rsSearch = Server.CreateObject("ADODB.Recordset"
rsSearch.ActiveConnection = MM_mydsn_STRING
rsSearch.Source = "SELECT * FROM Client WHERE CL_Last = '" Replace(rsSearch__MMColParam, "'", "''"
and "' or CL_First = " + Replace(rsSearch__firstname, "'", "''"
and " or CL_Company = " + Replace(rsSearch__company, "'", "''"
+ ""
rsSearch.CursorType = 0
rsSearch.CursorLocation = 2
rsSearch.LockType = 3
rsSearch.Open()
rsSearch_numRows = 0
if rsSearch.EOF then
response.redirect "add.asp"
end if
%>
Thanks in advance.
Delete * from brain Where MaxLevel = "Full" and reaction = "Slow" order by StartOver
FirstName
LastName
Company
I'm trying to search all fields if the user has either filled all fields all left some blank. I don't know the syntax on how to do the search
<%
set rsSearch = Server.CreateObject("ADODB.Recordset"
rsSearch.ActiveConnection = MM_mydsn_STRING
rsSearch.Source = "SELECT * FROM Client WHERE CL_Last = '" Replace(rsSearch__MMColParam, "'", "''"
rsSearch.CursorType = 0
rsSearch.CursorLocation = 2
rsSearch.LockType = 3
rsSearch.Open()
rsSearch_numRows = 0
if rsSearch.EOF then
response.redirect "add.asp"
end if
%>
Thanks in advance.
Delete * from brain Where MaxLevel = "Full" and reaction = "Slow" order by StartOver