日期:2014-05-17  浏览次数:20402 次

求教~~ [Microsoft][ODBC Microsoft Access Driver] 参数不足,期待是 1
在做一个网站购物车页面,做好后调试出这个[Microsoft][ODBC Microsoft Access Driver] 参数不足,期待是 1

代码段是
Dim CpbuyRecor
Dim CpbuyRecor_numRows
If Request.Form("Mytext")="yes" Then
Session("Cpbuy")=Request.Form("ProIdcheck")
End If
Set CpbuyRecor = Server.CreateObject("ADODB.Recordset")
CpbuyRecor.ActiveConnection = MM_conn_STRING
If Session("Cpbuy")<>"" And IsEmpty(Session("Cpbuy"))=False Then
CpbuyRecor.Source = "SELECT * FROM cp where ProId in ("+Session("Cpbuy")+")"
Else
 CpbuyRecor.Source = "SELECT * FROM cp where ProId =0"
End If
CpbuyRecor.CursorType = 0
CpbuyRecor.CursorLocation = 2
CpbuyRecor.LockType = 1
CpbuyRecor.Open()
CpbuyRecor_numRows = 0

红色为标识的错误行 专家求救啊 感谢~~



------解决方案--------------------
检查是否存在表cp
检查是否存在字段ProId