错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC 驱动程序管理器] 未发现数据源名称并且未指定默认驱动程序
第 27 行
<%
'声明变量
dim vardb,varmydomain,vardate,varmessage,varusername,varusername2,varuserid,maruser2id,varlogoff,varstyle,varcolour,varswearstatus,varpmrand,conn,rs,varsql,vartime,varrooms,varidletime,varidle,varlastpost,i
vardb = "dns=my15.mdb"
'初始化时间变量,记录当前时间
vardate = now()
'错误提示函数
function traperror
response.Write "错误产生!"
end function
'打开数据库函数
sub opendb
set conn=server.CreateObject ("adodb.connection")
conn. connectionstring= vardb
conn.open
end sub
'关闭数据库
sub closedb
rs.close
conn.close
set rs = nothing
end sub
'执行SQL语句
sub writedb(varsql)
set conn=server.createobject("adodb.connection")
conn.provider="microsoft.jet.loedb.4.0;jet oledb:database password=natterchat"
conn.open vardb
conn.execute(varsql)
conn.close
set conn = nothing
end sub
'打开数据库
call opendb
varsql = "select *from setup;"
rs.open varsql, conn
if rs.eof then
'打开setup表,如果为空,则提示错误
else
varidletime = rs("idletime")
varkickouttime = rs("kickouttime")
end if
call closedb
%>