I am getting the following Error in this parameterized query using Classic ASP.
ADODB.Command error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
Error is coming on this line cmd.CommandType = adCmdText
Dim requestedID
requestedID = Request("ID")
Dim requestedName
requestedName = Request("Name")
''' Create a parameterized SQL query
Dim strSQL
strSQL = "SELECT * FROM customer WHERE (ID = ?) AND (Name= ?)"
''' Create a Command object
Dim cmd
Set cmd = Server.CreateObject("ADODB.Command")
Set cmd.ActiveConnection = conn
cmd.CommandText = strSQL
cmd.CommandType = adCmdText
''' Create parameter objects and add them to the command
Dim paramID, paramName
Set paramID = cmd.CreateParameter("@ID", adInteger, adParamInput, , requestedID)
Set paramName = cmd.CreateParameter("@Name", adVarChar, adParamInput, 200, requestedName)
''' Add parameters to the command.
cmd.Parameters.Append paramID
cmd.Parameters.Append paramName
''' Execute the query
Dim rs
Set rs = cmd.Execute