ADODB.Recordset error '800a0bb9'

2019-07-29 09:02发布

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 ?

3条回答
混吃等死
2楼-- · 2019-07-29 09:25

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

SQL = "Select * From tblnews""

查看更多
Animai°情兽
3楼-- · 2019-07-29 09:29

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
查看更多
叛逆
4楼-- · 2019-07-29 09:36

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

hit= Cint(rs1("hit"))+1
查看更多
登录 后发表回答