0
votes

Quite exciting to find this jdbc driver for ms access.

However, when I try to test it with Oracle SQL Developer, I got:

Status : Failure -Test failed: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

Quoted from UCanAccess website:

Because it is a pure java implementation it run in both Windows and non-Windows Operative Systems(e.g., linux/unix). No ODBC needed.

What am I missing? Or I must configure ODBC in Windows environment?

1
SQL Developer doesn't let you just drop in any JDBC driver that you want. We only support specific ones. For Access, we use a JDBC to ODBC bridge to connect to Access - but it still requires the ODBC driver to talk to Access. The error is saying that the driver can't be found by the OS. I'm assuming you're using the 'Access' tab on the connection dialog to define your connection?thatjeffsmith
@thatjeffsmith, yes, I'm using the Access tab to define my connection after specified the ucanaccess-2.0.9.2.jar and related jars in 3rd party JDBCs. Is there any workaround?wez
You'll need to use the included JDK ODBC Bridge driver, and then have the MSFT odbc driver on your machine, we dont' support the UCanAccess drivers - be sure you're on JDK7 as ODBC Bridge is no longer avail in JDK8thatjeffsmith

1 Answers

1
votes

You shouldn't be using an ODBC URL, to open a hypothetical test.mdb in the user's home directory you might use something like

File file = new File(System.getProperty("user.home"), "test.mdb");
Connection conn = DriverManager.getConnection("jdbc:ucanaccess://" + 
   file.getPath());

The JDBC url begins with jdbc:ucanaccess:// which is followed by the Access database file path.

Finally, make sure you have the required dependencies (which are documented as)

jackcess-2.0.0.jar or later

  • commons-lang-2.4.jar
  • commons-logging-1.0.4.jar

hsqldb.jar(2.2.5)