![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have an .asp page that passes four variables to another .asp page by using an HTML form. A SQL query then runs against an Access database using those four variables. The variables are: "cnty", "rte", "bgn", and "nd". My current SQL statement is as follows: SQL = "SELECT * FROM Construction WHERE County='" & cnty & "' AND Route='" & rte & "' AND Begin<=" & nd & " AND Ending>=" & bgn & "" This works just fine, but I would like to add the ability to make "nd" and "bgn" Null (leave those fields blank on the HTML form), and then return all records that match the "cnty" and "rte" variables. I have an SQL Query in the Access database that does this perfectly but I'm having trouble getting the same functionality on the web. |
#3
| |||
| |||
|
|
valntyn via DBMonster.com wrote: I have an .asp page that passes four variables to another .asp page by using an HTML form. A SQL query then runs against an Access database using those four variables. The variables are: "cnty", "rte", "bgn", and "nd". My current SQL statement is as follows: SQL = "SELECT * FROM Construction WHERE County='" & cnty & "' AND Route='" & rte & "' AND Begin<=" & nd & " AND Ending>=" & bgn & "" This works just fine, but I would like to add the ability to make "nd" and "bgn" Null (leave those fields blank on the HTML form), and then return all records that match the "cnty" and "rte" variables. I have an SQL Query in the Access database that does this perfectly but I'm having trouble getting the same functionality on the web. |
#4
| |||
| |||
|
|
My current SQL statement is as follows: SQL = "SELECT * FROM Construction WHERE County='" & cnty & "' AND Route='" & rte & "' AND Begin<=" & nd & " AND Ending>=" & bgn & "" This works just fine, but I would like to add the ability to make "nd" and "bgn" Null (leave those fields blank on the HTML form), and then return all records that match the "cnty" and "rte" variables. I have an SQL Query in the Access database that does this perfectly but I'm having trouble getting the same functionality on the web. How about ... |
![]() |
| Thread Tools | |
| Display Modes | |
| |