Using The Database Connector With Access

Configuring The Query In Connections.ini

Microsoft Access uses the OleDb drivers. Set the Database line to be:

Database=OleDb

For Microsoft Access, use the following connection string in your connections.ini file. Replace PATH_TO_YOUR_DATABASEFILE with the actual file path to your .accdb file.

ConnectionString=Provider=Microsoft.ACE.OLEDB.12.0;Data Source=PATH_TO_YOUR_DATABASEFILE;Persist Security Info=False;

If your database requires a password, you will need to use a connection string like this:

ConnectionString=Provider=Microsoft.ACE.OLEDB.12.0;Data Source=PATH_TO_YOUR_DATABASEFILE;Jet OLEDB:Database Password=YOUR_ACCESS_PASSWORD;

Once you run the connector, you may receive the error:

System.InvalidOperationException: The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine

This means you will need to install the database drivers for Access on your machine. Go to to https://www.microsoft.com/en-us/download/details.aspx?id=13255 and install the AccessDatabaseEngine. If you are running a 64bit version of Windows, be sure to get the 64 bit driver, which is AccessDatabaseEngine_x64.

Error: Could not find file

If you get this error message, please check that the file is present. Are the directory path and file extension correct?  

Still need help? Contact Us Contact Us