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

前端 未结 5 665
轮回少年
轮回少年 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:18

    First, when I devoleped application with vbscript I used always the numbers to open a recordset. I recommend following line:

    rsPlanID.Open strSQL, m_objConn, 3, 3
    

    Make sure that you include the file adovbs.inc first. The numbers are conntected to the different types of recordset properties. And don't foregt to open the databse connection first.

    Second, I think you don't need the line

    rsPlanID.CursorLocation = adUseClient 
    

    Thrird, see also this thread. Maybe it is a good template for you.

提交回复
热议问题