好心人帮帮忙呀!!!多谢谢了!
[it]运行报错:[/it]Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e14'
[Microsoft][ODBC Microsoft Access Driver] 日期的语法错误 在查询表达式 'time < #2008-3-1 下午 01:01:03#' 中。
/love/online.asp,行 10
应该如何在下面的程序(online.asp)中进行修改呀?
<%
dim nowtime,connhs,kk,sqlhs,rsk,DBPathhs
nowtime=Now()
Set connhs = Server.CreateObject("ADODB.connection")
DBPathhs = Server.MapPath("../data/9wcom.asp")
connhs.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPathhs
'-----------------------------------------------------------------
sqlhs="select * from online1 where time < #"& DateAdd("n", -20,nowtime) & "#"
connhs.execute sqlhs
if isempty(session("u_id")) or session("u_id")="" or session("u_id")=1 then
kk=1
else
kk=session("u_id")
end if
if kk<>1 then
Set rsk = Server.CreateObject("ADODB.Recordset")
sqlhs="select * from online1 where user_id=" & kk
rsk.open sqlhs,connhs,3,2
if rsk.eof or rsk.bof then
rsk.addnew
rsk("user_id") = kk
end if
rsk("time") =nowtime
rsk.update
rsk.close
set rsk=nothing
end if
connhs.close
set connhs=nothing
%>