In order to connect with MS Access database from ASP one need to use below mentioned code:
Dim strConn
Set strConn = Server.CreateObject("ADODB.Connection")
strConn="DRIVER={Microsoft Access Driver (*.mdb)}; "
strConn=strConn & "DBQ=" & Server.mappath("db/mydb.mdb")
-OR-
strConn=strConn & "DBQ=C:\domains\mydomain.com\db\mydb.db"
One can use any connection path as they are either absolute or relative. This connection is a DSN Less connection.
Dim strConn
Set strConn = Server.CreateObject("ADODB.Connection")
strConn="DRIVER={Microsoft Access Driver (*.mdb)}; "
strConn=strConn & "DBQ=" & Server.mappath("db/mydb.mdb")
-OR-
strConn=strConn & "DBQ=C:\domains\mydomain.com\db\mydb.db"
One can use any connection path as they are either absolute or relative. This connection is a DSN Less connection.
Comment