You can use sample code below to connect to your MS Access database:
Connection String |
“Provider=MSDASQL;DRIVER={Microsoft Access Driver (*.mdb)};” &_ “UID=;PWD=YourPassword;” &_ “DBQ=DatabasePhysicalPath;” |
ConnectionString = “Provider=MSDASQL;DRIVER={Microsoft Access Driver (*.mdb)};” &_
“UID=;PWD=SamplePassword;” &_
“DBQ=C:\Domains\sample.net\db\sample.mdb;”
Set Conn = Server.CreateObject(“ADODB.Connection”)
Conn.ConnectionString = ConnectionString
Conn.Open
Please refer to the following article to know more.
Knowledge Base: Connection String for MS Access