How to Connect to MS Access Database using JDBC:ODBC Connection
Depending on whether your Java application is 32-bit or 64-bit, choose the correct ODBC Data Source Administrator (64bit or 32 bit) to create the Data Source Name. Otherwise, the connection cannot be established.
If your Java application is 64-bit then use ODBC Data Source Administrator 64-bit
If your Java application is 32-bit then use ODBC Data Source Administrator 32-bit
Open ODBC Data Source Administrator (make sure the correct version is used).
Select “System DSN” tab. Click “Add”.
In this example, we are connecting to MS Access database, in “Create New Data Source”, select “Microsoft Access Driver (*.mdb, *.accdb)” in the list. Click “Finish”.
In “ODBC Microsoft Access Setup”, enter any “Data Source Name”. This name will be used in DBeaver later. So remember it. After that click “Select…” button.
Now you have to locate your MS Access file. In this example we use “SMSEngine5.mdb”. Click “OK”.
Example of the Data Source Name created.
Open DBeaver (or any other database management tool). Click on “Database -> New Database Connection”
In “Connect to database”, select “ODBC” in the list. Click “Next”
Insert “Database/Schema” name the same like you created earlier in ODBC Data Source Administrator. Click “Test Connection” to test the ODBC connection.
If everything is setup right, you will get the below message. Click “Finish”