I've a problem. I've got a Database Access (.mdb). I want to connect my java application to the database.
I've done all the necessary in control Panel and into odbc. I set my 32 bit db in it.
Now when I open connection with Database I received only
[Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application
How can I resolve?
P.S. my Code is:
public DB() {
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
} catch (ClassNotFoundException e) {
JOptionPane.showMessageDialog(null, "errore nel costruttore del db");
e.printStackTrace();
}
}
public void openConnection(){
try {
String url ="jdbc:odbc:mydb.mdb";
this.conn = DriverManager.getConnection(url,"","");
} catch (SQLException e) {
JOptionPane.showMessageDialog(null, "errore nell'apertura del db");
e.printStackTrace();
}
}