Thank you for your thoughts
sduffield
Posts
-
Problem accessing QueryString [modified] -
Problem accessing QueryString [modified]Thank you
-
Problem accessing QueryString [modified]Please help. Here is the record layout of my Access Database. ID VENDNO VENDOR BEL COL HAR JEF MOR SUPNO SUPPLY On my webpage I have an image of a five county area in Ohio with hotspots. (BEL, COL, HAR, JEF, MOR are those counties)When a visitor clicks on a county (the link looks like ?county=COL) then I want the code to show every vendor that does not have an "X" in the corresponding county. Here is the code I have so far: <% Set connectionToDatabase=Server.CreateObject("ADODB.Connection") connectionToDatabase.ConnectionTimeout=60 connectionToDatabase.Open "DSN=ICDC_Brands" Set recordSet=Server.CreateObject("ADODB.Recordset") recordSet.Open "SELECT * FROM vendor", connectionToDatabase if Request.QueryString("county") = "" then Response.Write("") elseif Request.QueryString("county") <> "" then Do While NOT recordSet.EOF I think this is problem line --> If recordSet("Request.QueryString") <> "X" Then Response.Write(recordSet("VENDOR") & "<br>") end if recordSet.MoveNext Loop end if connectionToDatabase.Close Set connectionToDatabase=Nothing %> When I visit the page and click on a county, the web browser says: ADODB.Recordset error '800a0cc1' Item cannot be found in the collection corresponding to the requested name or ordinal. /test/brands.asp, line 110 Any thoughts would be appreciated. Thank you
modified on Wednesday, February 10, 2010 3:47 PM
-
If...Then... Else based upon QueryStringThank you, Fred. I really appreciate your help! Actually, I am shocked that I was that close. sduffield
-
If...Then... Else based upon QueryStringI am trying to display an image. Depending, though, on a test of the QueryString you'll get one of two images. This is what I've come up with so far.
<% if Request.QueryString("section") = "statebooks" then
Response.Write()
elseif Request.QueryString("section") = "directory" then
Response.Write()
else
Response.Write()
end if
%>Am I even close? Any help would be much appreciated. Thank you. sduffield