我正在尝试在 ASP-Classic 中转换未参数化的 SQL Server 2008 R2 Express 查询,因此我执行了以下操作(请参见下面的代码),但我一直收到错误消息:
对象不支持此属性或方法:“参数”
有人可以告诉我我做错了什么!
谢谢!
<%
' OPEN DATABASE
dim objConn, objRS, objTRS, objUnit
dim strConnection
set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "Driver={SQL Server};Server=MSSQLSrv;Database=DbTest;UID=blablabala;PWD=blablabala"
objConn.Open strConnection
set objRS = Server.CreateObject("ADODB.Recordset")
set objRS.ActiveConnection = objConn
strQuery = "SELECT USERNAME,PASSWORD from CUSTOMERS where EMAIL=?"
objRS.Parameters(0) = Request.QueryString("email")
objRS.Open strQuery
%>