Connecting to Microsoft Access (ADO)

www.altova.com Print this Topic Previous Page Up One Level Next page

Home >  Connecting to a Database > Database Connection Examples >

Connecting to Microsoft Access (ADO)

A simple way to connect to a Microsoft Access database is to follow the wizard and browse for the database file, as shown in Connecting to an Existing Microsoft Access Database. An alternative approach is to set up an ADO connection explicitly, as shown in this topic. This approach is useful if your database is password-protected.

 

It is also possible to connect to Microsoft Access through an ODBC connection, but there are some limitations in this scenario, so it is best to avoid it.

 

 

To connect to a password-protected Microsoft Access database:

1.Start the database connection wizard.
2.Click ADO Connections.
3.Click Build.

ExampleAccess03

4.Select the Microsoft Office 15.0 Access Database Engine OLE DB Provider, and then click Next.

ExampleAccess04

5.In the Data Source box, enter the path to the Microsoft Access file. Because the file is on the local network share U:\Departments\Finance\Reports\Revenue.accdb, we will convert it to UNC format, and namely \\server1\\dfs\Departments\Finance\Reports\Revenue.accdb, where server1 is the name of the server and dfs is the name of the network share.
6.On the All tab, double click the Jet OLEDB:Database Password property and enter the database password as property value.

ADOConnectionDialog02

Note:If you are still unable to connect, locate the workgroup information file (System.MDW) applicable to your user profile, and set the value of the Jet OLEDB: System database property to the path of the System.MDW file.

© 2019 Altova GmbH