I have a Classic ASP page that contains the following code to attempt a parametised query;
<%
Set cmdEmail = Server.CreateObject(\"ADODB.Command\")
Set rsEmai
set cmdEmail = Server.CreateObject("ADODB.Command")
Try and put some debug statements to check, if it is creating an instance of ADODB.Command
.
e.g.
If (cmdEmail is Nothing) Then
Response.Write("could not create the instance")
Else
Response.Write("created the instance")
End If
Also, remove the With
block and see if that makes any difference
dim paramContentID
cmdEmail.CommandText = "SELECT * FROM VWTenantPropertiesResults WHERE ContentID = ?"
cmdEmail.CommandType = 1
cmdEmail.ActiveConnection = MM_dbconn_STRING
set paramContentID = cmdEmail.CreateParameter("@ContentID", 3, 1, , request.Form("ContentID"))
cmdEmail.Parameters.Append paramContentID