方法1:
dim conn,dbpath,ConnString set conn=server.createobject("adodb.connection") dbpath="database.mdb" ConnString="driver={microsoft access driver (*.mdb)};dbq="&server.mappath(dbpath) conn.open ConnString
方法2:
dim conn,dbpath,ConnString dbpath="database.mdb" ConnString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(dbpath) set conn=server.createobject("adodb.connection") conn.open ConnString