ASP点击代率码问题

来源:百度知道 编辑:UC知道 时间:2024/05/28 09:14:04
这是我写的代码,就是运行老出问题,高手帮看看
<%
id=Request.QueryString("id")%>
<% ConnStr = "driver={SQL Server};server=127.0.0.1;uid=sa;pwd=*******;database=wt"
Set conn = Server.CreateObject ("ADODB.Connection")
conn.open ConnStr
Set rs=Server.CreateObject ("ADODB.RecordSet")
rs.open "update wz set hot=hot+1 where id="&id
rs.close
conn.close
%>
二楼的朋友,我照你的做了,但是它显示
ADODB.Connection 错误 '800a0e79'

对象打开时,不允许操作。

/adm/not1.asp,行 10
就是这一行conn.open "update wz set hot=hot+1 where id="&cint(id)
按我的写,它说是对象无法打开,它在面或后面已经关闭

问题已经解决,谢谢大家

<%
id=Request.QueryString("id")%>
<% ConnStr = "driver={SQL Server};server=127.0.0.1;uid=sa;pwd=*******;database=wt"
Set conn = Server.CreateObject ("ADODB.Connection")
conn.open ConnStr

conn.open "update wz set hot=hot+1 where id="&cint(id)

conn.close
%>

你应该把错误信息也贴上.
有针对性一点.