2

I am using the UCanAccess driver from http://ucanaccess.sourceforge.net/site.html

By using this driver I am able to access a local Access database file from Java like this:

conn=DriverManager.getConnection("jdbc:ucanaccess://c:/pippo.mdb;memory=false");) 

When I want to access an Access database file from a remote machine what would be the URL to pass to the getConnection method?

Gord Thompson
  • 116,920
  • 32
  • 215
  • 418

1 Answers1

1

The file on the remote machine must be accessible via Windows file sharing (or equivalent, e.g., a Samba share). The connection URL in your Java application will either use a mapped drive letter (as defined at the OS level)

DriverManager.getConnection("jdbc:ucanaccess://z:/somefolder/pippo.mdb);

or a UNC path

DriverManager.getConnection("jdbc:ucanaccess:////servername/sharename/somefolder/pippo.mdb");
Gord Thompson
  • 116,920
  • 32
  • 215
  • 418