我对这类事情没有经验,所以我想问一下我是否要使用下面的代码,我可以免受 MS SQL 注入攻击/类似的事情吗?
' OPEN DATABASE
dim objConn,objRS,objTRS,objUnit
Set objConn = Server.CreateObject("ADODB.Command")
objConn.ActiveConnection = "Driver={SQL Server};Server=MSSQLSrv;Database=DbTest;UID=blablabala;PWD=blablabala"
strQuery = "SELECT USERNAME,PASSWORD from CUSTOMERS where EMAIL=?"
objConn.CommandText=strQuery
objConn.Parameters(0) = Request.QueryString("email")
SET objRS = objConn.execute(strQuery)