I have this problem in Eclipse and MyEclipse. I create the connection with
public Connection getConnection() throws SQLException {
String driver = "sun.jdbc.odbc.JdbcOdbcDriver";
String fullConnectionString = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ="
+ filePath;
Connection conn = null;
try {
Class.forName(driver);
conn = DriverManager.getConnection(fullConnectionString, userName,
password);
} catch (ClassNotFoundException cnfe) {
throw new SQLException("ClassNotFoundException");
} catch (SQLException e) {
throw new SQLException("SQLException");
}
return conn;
}
} // Sorry, but using the code option was giving me problems
The exact problem is that I get the error "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"; for some reason
JDBC is working different in the worspaces.
I am absolutely puzzled. The code stopped working in a workspace, but when I tried it in another workspace it worked.