D
davidharveyg
Hi,
I have an asp form with several search fields available.
Each search field has a check box against it, i.e. the user can decide
which fields should be included in the search.
Some fields are text boxes, others are drop downs.
I want to know how to create a simple SQL search string based on the
fields the user selects (or rather based on the check boxes the users
selects and the data in those fields to search on.
I have the following in my ASP code
customer = request.form("CustomerName") ...user can select from a list
date_s = request.form("start") .... user enters a date mm/dd/yyyy
date_e = request.form("end") .... user enters a date mm/dd/yyyy
product = request.form("prod") .... user enters a code or part of a
code
serial = request.form("serial") .... user enters a number or part of a
number
fr = request.form("Fault-R") .... user enters a string to find
matching
ff = request.form("Fault-F") .... user selects from a drop down
fn = request.form("Fault-N").... user enters a string to find matching
ca = request.form("Cause-F").... user selects from a drop down
cn = request.form("Cause-N").... user enters a string to find matching
Obviously the user could select any combination of fields, so what is
the best way of handling this ?
Appreciate your help / advice
Thanks
David
I have an asp form with several search fields available.
Each search field has a check box against it, i.e. the user can decide
which fields should be included in the search.
Some fields are text boxes, others are drop downs.
I want to know how to create a simple SQL search string based on the
fields the user selects (or rather based on the check boxes the users
selects and the data in those fields to search on.
I have the following in my ASP code
customer = request.form("CustomerName") ...user can select from a list
date_s = request.form("start") .... user enters a date mm/dd/yyyy
date_e = request.form("end") .... user enters a date mm/dd/yyyy
product = request.form("prod") .... user enters a code or part of a
code
serial = request.form("serial") .... user enters a number or part of a
number
fr = request.form("Fault-R") .... user enters a string to find
matching
ff = request.form("Fault-F") .... user selects from a drop down
fn = request.form("Fault-N").... user enters a string to find matching
ca = request.form("Cause-F").... user selects from a drop down
cn = request.form("Cause-N").... user enters a string to find matching
Obviously the user could select any combination of fields, so what is
the best way of handling this ?
Appreciate your help / advice
Thanks
David