I have a fully functioning "store locator" web application that returns store location results based on a postal code form field.
I am taking this existing application and would like to filter the results using additional search criteria. To accomplish this, I am incorporating this application with a Dreamweaver extension that generates the advanced search code (DataAssist).
My question is as follows:
I need to pull apart the store locator application's recordset WHERE clause and place the criteria individually in the dialog box that will create the ultimate advanced search. I'm not too fluent in ASP/SQL so I'm not sure which items to retain from the following WHERE clause:
SELECT STATEMENT CODE:
Recordset1.Source = "SELECT * FROM Query1 WHERE LATITUDE <= " + Replace(Recordset1__HighLatitude, "'", "''") + " AND LATITUDE >= " + Replace(Recordset1__LowLatitude, "'", "''") + " AND LONGITUDE >= " + Replace(Recordset1__LowLongitude, "'", "''") + " AND LONGITUDE <= " + Replace(Recordset1__HighLongitude, "'", "''") + " "
THIS CODE PARTIALLY EXPLAINS THE VARIABLES USED IN THE SQL QUERY AND APPEARS BEFORE IT:
<%
Dim Recordset1__HighLongitude
Recordset1__HighLongitude = "00"
if (HighLongitude <> "") then Recordset1__HighLongitude = HighLongitude
%>
THIS IS THE WHERE CLAUSE GENERATED BY DATAASSIST EXTENSION FOR THE ADDITIONAL CRITERIA (OTHER THAN THE POSTALCODE RELATED CRITERIA)-IN CASE THIS HELPS:
WADbSearch1_whereClause=BuildFilterString("VendorPartNumber","" & cStr( Session("VendorPartNumber") ) & "","AND","=",0,WADbSearch1_wildCard,WADbSearch1_dateSeparator,WADbSearch1_whereClause)
WADbSearch1_whereClause=BuildFilterString("CustomText10","" & cStr( Session("Industry") ) & "","AND","=",0,WADbSearch1_wildCard,WADbSearch1_dateSeparator,WADbSearch1_whereClause)
I am taking this existing application and would like to filter the results using additional search criteria. To accomplish this, I am incorporating this application with a Dreamweaver extension that generates the advanced search code (DataAssist).
My question is as follows:
I need to pull apart the store locator application's recordset WHERE clause and place the criteria individually in the dialog box that will create the ultimate advanced search. I'm not too fluent in ASP/SQL so I'm not sure which items to retain from the following WHERE clause:
SELECT STATEMENT CODE:
Recordset1.Source = "SELECT * FROM Query1 WHERE LATITUDE <= " + Replace(Recordset1__HighLatitude, "'", "''") + " AND LATITUDE >= " + Replace(Recordset1__LowLatitude, "'", "''") + " AND LONGITUDE >= " + Replace(Recordset1__LowLongitude, "'", "''") + " AND LONGITUDE <= " + Replace(Recordset1__HighLongitude, "'", "''") + " "
THIS CODE PARTIALLY EXPLAINS THE VARIABLES USED IN THE SQL QUERY AND APPEARS BEFORE IT:
<%
Dim Recordset1__HighLongitude
Recordset1__HighLongitude = "00"
if (HighLongitude <> "") then Recordset1__HighLongitude = HighLongitude
%>
THIS IS THE WHERE CLAUSE GENERATED BY DATAASSIST EXTENSION FOR THE ADDITIONAL CRITERIA (OTHER THAN THE POSTALCODE RELATED CRITERIA)-IN CASE THIS HELPS:
WADbSearch1_whereClause=BuildFilterString("VendorPartNumber","" & cStr( Session("VendorPartNumber") ) & "","AND","=",0,WADbSearch1_wildCard,WADbSearch1_dateSeparator,WADbSearch1_whereClause)
WADbSearch1_whereClause=BuildFilterString("CustomText10","" & cStr( Session("Industry") ) & "","AND","=",0,WADbSearch1_wildCard,WADbSearch1_dateSeparator,WADbSearch1_whereClause)