conn.asp代码
<%
dim conn,connstr,mdb
mdb="board.mdb"
on error resume next
Connstr="DRIVER=Microsoft Access Driver (*.mdb);DBQ="+server.mappath(mdb)
Set Conn=Server.CreateObject("ADODB.Connection")
conn.Open connstr
If Err Then
err.Clear
Set Conn = Nothing
Response.Write "数据库连接出错,请检查连接字串。"
Response.End
End If
%>