problem with Invalid column name 'TX'.
I am having an issue with this error. I am loading a page and passing the parameters like this...
ZipcodeSelect.asp?State=TX&City=Houston
but when I try to do my select statement below
<%
strState = request("State")
strCity = request ("City")
sql = "SELECT Zips.zipcode FROM Zips WHERE State=" & strState & " AND City=" & strCity
set rs = conn.execute(sql)
%>
I keep getting this error...
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'TX'.
The perameters are dynamic of course based upon info in the database.
my actual table columns are...
zipcode, State, City, lat, and long...
what gives?
|