[Microsoft][ODBC Microsoft Access Driver] '(unknown)' is not a valid path

Sunil picture Sunil · Aug 9, 2014 · Viewed 10.7k times · Source

I have created DSN for Mapped drive like this:-

 Y:\\192.168.2.5\data\db.accdb

Now i am accessing this database from java application using sun jdbc odbc drivers. Application is running on Window 2008 64-bit system and database is running on Window Server 2012 64-bit system.

When I ran this application with Java 64-bit it throw error of architecture mismatch.

Then i install java of 32-bit and the above problem is resolved. But getting another problem as

  java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] '(unknown)' is
  not a valid path. Make sure that the path name is spelled correctly and that yo
  u are connected to the server on which the file resides. 

How to resolve this problem?

enter image description here

See the database path witch is not valid for my program. This path is mapped with Y:\192.168.2.5\shared drive.

Answer

Chas Callaway picture Chas Callaway · Apr 5, 2017

I have discovered, it seems, that a mapped network drive is not available to IIS as it runs as a service. In addition, I have been unable to create a DSN entry with a UNC path. So, I created the DSN with a local database, then changed the path in Regedit. What a pain. Be sure to provide proper credentials (UID and PWD).