Why does this work
sqltext = "SELECT * FROM Forsale WHERE Category_Name = 'Spares' ORDER BY Sale_Price "
But when I send the Spares in as a variable from a query string.
sqltext = "SELECT * FROM Forsale WHERE Category_Name = "& Choice &" ORDER BY Sale_Price "
It doesn't
Querystring gained here and sent to the same page
<option value="classifieds.asp?Pref=<%= Searches("Category_Name" %>">
Then grabbed back here
<% If request.Querystring("Pref" <> "" Then
Set Choice = request.QueryString("Pref"
%>
I can write it out to the page no problem so it is being carried accross ok.
<%= Choice %>
Just the SQL query that fails and gives this error.
Too few parameters. Expected 1.
Been stuck on this for ages now and it's starting to drive me nuts. Any help would be excellent.
sqltext = "SELECT * FROM Forsale WHERE Category_Name = 'Spares' ORDER BY Sale_Price "
But when I send the Spares in as a variable from a query string.
sqltext = "SELECT * FROM Forsale WHERE Category_Name = "& Choice &" ORDER BY Sale_Price "
It doesn't
Querystring gained here and sent to the same page
<option value="classifieds.asp?Pref=<%= Searches("Category_Name" %>">
Then grabbed back here
<% If request.Querystring("Pref" <> "" Then
Set Choice = request.QueryString("Pref"
%>
I can write it out to the page no problem so it is being carried accross ok.
<%= Choice %>
Just the SQL query that fails and gives this error.
Too few parameters. Expected 1.
Been stuck on this for ages now and it's starting to drive me nuts. Any help would be excellent.