dim conn,connstr
set conn = server.createobject("adodb.connection")
connstr= "provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source = " & Server.MapPath("文件夹/数据库名.mdb")
if err then
err.clear
else
conn.open connstr
end if
Sub closeconn() conn.close set conn=nothing
end sub
on error resume next