小站出现访问错误:Microsoft JET Database Engine 错误 '80040e07'
http://e.elanvr.com/index.asp这个是我的小站,换了空间后出现错误,如下:MicrosoftJETDatabaseEngine错误'80040e...
http://e.elanvr.com/index.asp
这个是我的小站,换了空间后出现错误,如下:
Microsoft JET Database Engine 错误 '80040e07'
日期的语法错误 在查询表达式 '#2006-10-7 下午 05:26:22#' 中。
/lib/online.asp,行 15
而我以前的空间没问题:http://www.elanvr.com
请求高手解答,下面是
online.asp的源码:
<%
openadmin
ip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
if ip = "" then
ip = Request.ServerVariables("REMOTE_ADDR")
end if
strsql = "select * from online where online_ip = '" & ip & "'"
set rs = conn.Execute (strsql)
struser = "游客"
if rs.eof or rs.bof then
strsql = "insert into online (online_name, online_ip, online_stats, online_lasttime) values ('" & struser & "', '" & ip & "','" & stats & "','" &now()& "')"
conn.Execute (strsql)
else
strsql = "update online set online_name = '"&struser& "', online_stats='"&stats&"', Online_LastTime = #" &now()&"# where online_ip = '" & ip & "'"
conn.Execute (strsql)
end if
if struser <> "游客" then
strsql = "delete from online where online_name = '" & struser & "' and online_ip <> '" & ip & "'"
conn.Execute (strsql)
end if
strsql = "select online_id, online_lasttime from online"
set rs = conn.Execute (strsql)
if not (rs.eof or rs.bof) then
do until rs.Eof
if DateDiff("h",rs("online_lasttime"),now())>OnlineTime then
strsql = "delete from online where online_id = " & rs("online_id")
conn.Execute (strsql)
end if
rs.movenext
loop
end if
strsql="select Online_Name from online"
guest=0
user=0
total=0
username=""
set rs = conn.Execute (strsql)
if rs.eof or rs.bof then
username="无在线用户"
else
do until rs.Eof
if rs("Online_Name") <> "游客" then
user=user+1
username=username+rs("Online_Name")+" "
else
guest = guest +1
end if
rs.movenext
loop
total=user+guest
end if
sql="select online_topnum,online_topdate from allcount"
set rs2=conn.execute(sql)
online_topnum=rs2("online_topnum")
online_topdate=rs2("online_topdate")
rs2.close
set rs2=nothing
if total>online_topnum then
online_topnum=total
online_topdate=now()
strsql = "update allcount set online_topnum = '"&total& "', Online_topdate = #" &now()& "#"
conn.Execute (strsql)
end if
strsql = "update online set online_stats = '" & stats & "' where online_ip = '" & ip & "'"
conn.Execute (strsql)
rs.close
set rs=nothing
%> 展开
这个是我的小站,换了空间后出现错误,如下:
Microsoft JET Database Engine 错误 '80040e07'
日期的语法错误 在查询表达式 '#2006-10-7 下午 05:26:22#' 中。
/lib/online.asp,行 15
而我以前的空间没问题:http://www.elanvr.com
请求高手解答,下面是
online.asp的源码:
<%
openadmin
ip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
if ip = "" then
ip = Request.ServerVariables("REMOTE_ADDR")
end if
strsql = "select * from online where online_ip = '" & ip & "'"
set rs = conn.Execute (strsql)
struser = "游客"
if rs.eof or rs.bof then
strsql = "insert into online (online_name, online_ip, online_stats, online_lasttime) values ('" & struser & "', '" & ip & "','" & stats & "','" &now()& "')"
conn.Execute (strsql)
else
strsql = "update online set online_name = '"&struser& "', online_stats='"&stats&"', Online_LastTime = #" &now()&"# where online_ip = '" & ip & "'"
conn.Execute (strsql)
end if
if struser <> "游客" then
strsql = "delete from online where online_name = '" & struser & "' and online_ip <> '" & ip & "'"
conn.Execute (strsql)
end if
strsql = "select online_id, online_lasttime from online"
set rs = conn.Execute (strsql)
if not (rs.eof or rs.bof) then
do until rs.Eof
if DateDiff("h",rs("online_lasttime"),now())>OnlineTime then
strsql = "delete from online where online_id = " & rs("online_id")
conn.Execute (strsql)
end if
rs.movenext
loop
end if
strsql="select Online_Name from online"
guest=0
user=0
total=0
username=""
set rs = conn.Execute (strsql)
if rs.eof or rs.bof then
username="无在线用户"
else
do until rs.Eof
if rs("Online_Name") <> "游客" then
user=user+1
username=username+rs("Online_Name")+" "
else
guest = guest +1
end if
rs.movenext
loop
total=user+guest
end if
sql="select online_topnum,online_topdate from allcount"
set rs2=conn.execute(sql)
online_topnum=rs2("online_topnum")
online_topdate=rs2("online_topdate")
rs2.close
set rs2=nothing
if total>online_topnum then
online_topnum=total
online_topdate=now()
strsql = "update allcount set online_topnum = '"&total& "', Online_topdate = #" &now()& "#"
conn.Execute (strsql)
end if
strsql = "update online set online_stats = '" & stats & "' where online_ip = '" & ip & "'"
conn.Execute (strsql)
rs.close
set rs=nothing
%> 展开
1个回答
名片
2024-10-28 广告
2024-10-28 广告
Altair HyperWorks软件授权是优菁科技(上海)有限公司为客户提供的重要服务之一。我们确保每位客户都能合法、安全地使用HyperWorks这一先进的CAE(计算机辅助工程)平台。通过与Altair公司的紧密合作,我们为客户提供正...
点击进入详情页
本回答由名片提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询