Mondoze Knowledge Base

Search our articles or browse by category below

Connect to MS Access Database

Last modified: October 7, 2022
You are here:
Estimated reading time: < 1 min

How To Connect to MS Access Database

Connection String
“Provider=MSDASQL;DRIVER={Microsoft Access Driver (*.mdb)};” &_
“UID=;PWD=YourPassword;” &_
“DBQ=DatabasePhysicalPath;”

You can use sample code below to connect to your MS Access’s database:

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

Was this article helpful?
Dislike 0
Views: 46