ADODB.Recordset error '800a0bb9'

2019-07-29 09:13发布

问题:

ADODB.Recordset error '800a0bb9'

Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

/down_see.asp, line 21

my code here:

Sorgu="Select * From tblNews"
Rs.Open Sorgu,bag,1

rs.Close
Set rs=Nothing

Set rs1 = Server.CreateObject("ADODB.Recordset")
SQL = "Select * From tblnews""
rs1.Open SQL,conn,1,3

rs1("hit")=rs1("hit")+1
rs1.update

what wrong ?

回答1:

rs("hit") is a string and not a number. Cast it as a number. Integer will do probably.

hit= Cint(rs1("hit"))+1


回答2:

You have a double quote where there should be a single quote at the end of this line

SQL = "Select * From tblnews""



回答3:

You must use bag or conn if your database connection opened with bag you must use it.

Rs.Open Sorgu,bag,1

rs1.Open SQL,conn,1,3     
rs1.Open SQL,bag,1,3