ASP與Access數據庫鏈接: <% dim conn,mdbfile mdbfile=server.mappath("數據庫名稱.mdb") set conn=server.createobject("adodb.connection") conn.open "driver={microsoft access driver (*.mdb)};uid=admin;pwd=數據庫密碼;dbq="&mdbfile %> ASP與SQL數據庫鏈接: <% dim conn set conn=server.createobject("ADODB.connection") con.open "PROVIDER=SQLOLEDB;DATA SOURCE=SQL服務器名稱或IP地址;UID=sa;PWD=數據庫密碼;DATABASE=數據庫名稱 %>