ADODB.Recordset error '800a0bb9' : Arguments are of the wrong type

前端 未结 5 655
轮回少年
轮回少年 2020-12-03 23:25
Set rsPlanID = Server.CreateObject(\"ADODB.Recordset\")
rsPlanID.CursorLocation = adUseClient

strSQL = \"SELECT PlanID FROM ATTJournals WHERE ATTUserDataID = \" &am         


        
5条回答
  •  春和景丽
    2020-12-04 00:23

    Unless you need to navigate back and forth in the recordset, just use the default settings:

    strSQL = "SELECT PlanID FROM ATTJournals WHERE ATTUserDataID = " & ATTUserDataID 
    Set rsPlanID = m_objConn.Execute(strSQL)
    

    Also, your code is wide open for SQL Injection attacks - you better learn about it and change your code to use Parameters instead.

提交回复
热议问题