Server Gigabit Guide

Connect to MS Access Database

You are here:
Estimated reading time: < 1 min

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

Was this article helpful?
Dislike 0
Views: 44