日期:2014-05-17  浏览次数:20755 次

请问各位高手 我的update语句怎么没有执行成功啊?也不报错
代码是这样的:
<%
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