Hi All
We are building an application with ASP/SQL Server and need to build a
search page. I want to display lots of fields/textboxes on the search page
to allow user to search any field by entering the search terms in any of the
textboxes.
I was thinking of using lots of if conditions to build the search string
something like
strSQL = "Select <<fieldnames>> from Contracts where Active= True "
if request.form("contractno") <> "" then
strSQL = strSQL & " and contractno ='" & request.form("contractno")
& "'"
end if
Does anyone know of a better way to build the SQL string. Also any methods
to speed up the query built will be much appreciated. I have already limited
the total results that the query displays but adding " Top 20 " in the SQL
string. Any other suggestions?