出现错误ADODB.Recordset错误'800a0bb9'参数类型错误,超出可接受范围或彼此冲突 [英] getting error ADODB.Recordset error '800a0bb9' Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another
本文介绍了出现错误ADODB.Recordset错误'800a0bb9'参数类型错误,超出可接受范围或彼此冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试将数据库中的数据绑定到我的页面,代码如下所示
I am trying to bind data to my page from database the code is given below
Dim oCon, pages, Rec, DisplayNum, i, page, SQL, ipage, z, MaxRows
Set QGetList = Server.CreateObject ("ADODB.Recordset")
'QGetList.PageSize = MaxRows
'QGetList.CursorLocation = adUseClient
'Set QGetProgramItem = Server.CreateObject("ADODB.Recordset")
SQL = " SELECT ModelRow, SeriesRow, ModelCode, Item.* FROM tblSPCMaster_Item Item " &_
" LEFT OUTER JOIN viewModelSeries VM on VM.vch_ModelName = Item.vModelName AND VM.modelcode = Item.vModelCode " &_
" WHERE iSPCMasterID = '" & Request.querystring("PID") & "' ORDER BY ModelRow, SeriesRow, Item.iSeq"
QGetList.Open SQL, dpconn, 1
ipage = QGetList.PageCount
if QGetList.EOF OR QGetList.BOF Then
x = 1
else
if page = 0 or page > ipage Then
QGetList.AbsolutePage = ipage
else
QGetList.AbsolutePage = page
end if
end if
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-Disposition", "attachment; filename=Stock_Inventory_Management_Export_" & Year(now) & Month(now) & day(now) & hour(now) & minute(now) & ".xls"
我遇到错误:
ADODB.Recordset错误'800a0bb9'
ADODB.Recordset error '800a0bb9'
参数类型错误,超出可接受范围或彼此冲突.
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
我想念的东西我没有得到,请帮助我
what i am missing i am not getting please help me
推荐答案
此行:
QGetList.Open SQL, dpconn, 1
对于第一个参数,它需要一个Command
对象.您给了它一个字符串.
For the first argument, it expects an Command
object. You gave it a string.
修复您的SQL Injection漏洞.
Fix your SQL Injection vulnerability.
这篇关于出现错误ADODB.Recordset错误'800a0bb9'参数类型错误,超出可接受范围或彼此冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文