代码是这样的:
<%
newsid=request("newsid")
response.Write "newsid is &&&&&&&&&&&&&&"&newsid
set hitrs=server.createobject("adodb.recordset")
dim hitsqltext
hitsqltext="select co_hit from newcount"
hitrs.open hitsqltext,conn,2,1
'response.End()
%>
hitid is :
<%= hitrs("co_hit") %>
<%
set prohitrs=server.createobject("adodb.connection")
dim prohitsqltext
prohitsqltext="update newcount set co_hit = 1 where co_id = '"& hitrs("co_hit") &"'"
prohitrs.open prohitsqltext,conn,1,1
%>
很奇怪 请高手指点 asp不用很多时候了 诚恳请高手帮助
------解决方案--------------------
set prohitrs=server.createobject("adodb.connection")<---你创建的是Connection
-------
...
prohitsqltext="update newcount set co_hit = 1 where co_id = '" & hitrs("co_hit") & "'"
conn.execute prohitsqltext
conn.close
Set conn = Nothing