MultiSelect List boxes as query parameters
jhd1967 | Posted 8:56am 25. June 2009 Server Time |
i have page that you can check the values using check box and click compare then it will give the results of the two check box choosen.
but i am getting errors.
Application uses a value of the wrong type for the current operation. LINE
rsSearch_cmd.Parameters.Append rsSearch_cmd.CreateParameter("param1", 5, 1, -1, rsSearch__MMColParam) ' adDouble
Query string is like this
compare.asp?compare=466&compare=4600
<%
Dim rsSearch__MMColParam
rsSearch__MMColParam = "%"
If (Request.QueryString("compare") <> "") Then
rsSearch__MMColParam = Request.QueryString("compare")
End If
%>
<%
Dim rsSearch
Dim rsSearch_cmd
Dim rsSearch_numRows
Set rsSearch_cmd = Server.CreateObject ("ADODB.Command")
rsSearch_cmd.ActiveConnection = MM_classifieds_STRING
rsSearch_cmd.CommandText = "SELECT * FROM dbo.NEWS WHERE NEWS_ID IN (?)"
rsSearch_cmd.Prepared = true
rsSearch_cmd.Parameters.Append rsSearch_cmd.CreateParameter("param1", 5, 1, -1, rsSearch__MMColParam) ' adDouble
Set rsSearch = rsSearch_cmd.Execute
rsSearch_numRows = 0
%> |