关于后台统计网站访问情况
如果在一个页面(tj.asp)里就下面的代码,为什么打开后数据写不到库里
<%
set rsCou = Server.CreateObject( "ADODB.Recordset ")
if Session( "mylogin ") <> "1 " then
sqltext= "update syswork set querycount=querycount+1 where code= '101 ' "
conn.execute(sqltext)
sql= "select * ftom webcount "
rsCou.Open ,sql,conn,3,3
rsCou.AddNew
rsCou( "ipaddress ")=Request.ServerVariables( "Remote_HOST ")
rsCou( "logindate ")=now()
rsCou.Update
rsCou.Close
mylogin=Session( "mylogin ")
Session( "mylogin ")= "1 "
else
mylogin=Session( "mylogin ")
end if
%>
------解决方案--------------------代码:sql= "select * ftom webcount "
rsCou.Open ,sql,conn,3,3
错了!
改为:
sql= "select * from webcount "
rsCou.Open sql,conn,3,3