Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

connecting to a remote MS ACCESS database in java

Tags:

java

ms-access

I am developing application in java which is having back end in MS Access. it works fine on a local MS Access database using the following connection string:

 DriverManager.getConnection(
    "jdbc:odbc:Driver={Microsoft Access Driver  (*.mdb)};Dbq=d:\test.mdb");

What will be the connection string to connect to a Remote MS ACCESS database on another machine. please reply......

like image 814
Azuu Avatar asked Jan 27 '26 14:01

Azuu


1 Answers

The answer depends on how you are able to connect to the other machine. You can connect if the remote copy of test.mdb is available from a file share on the other machine on the same LAN.

For a share mapped to drive letter X:

Dbq=X:\test.mdb

Or use the UNC path:

Dbq=\\machine_name\share_name\test.mdb

If you can't use either of those, Access is not suitable and you should choose a different database for your data storage.

Note, I'm assuming both the local and remote machine are running MS Windows. If either or both are running a different operating system, you should tell us which OS is used.

like image 149
HansUp Avatar answered Jan 29 '26 03:01

HansUp



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!