Reputation: 717
I can happily connect to a System DSN using JDBC:
DriverManager.getConnection("jdbc:odbc:SysDSN");
If I try and use a File DSN however I get an error:
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Using:
DriverManager.getConnection("jdbc:odbc:FileDSN");
I've tried specifying a path to the File DSN and still get no joy.
Upvotes: 3
Views: 6236
Reputation: 308998
I'd recommend using an DSN-less connection URL, as shown here:
Creating a DSN-less connection for MS Access within Java
You won't have to create a DSN that way.
PS - You did create the data source before you tried it your way, didn't you?
Upvotes: 2