My platform is Windows 7 64 bit with Eclipse Juno, my code is quite simple,
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)};DBQ=student.mdb","","");
//Connection con = DriverManager.getConnection("jdbc:odbc:student.mdb");
System.out.println("Row is added");
}
catch(Exception e){
System.out.println("does not added:"+e);
}
}
}
I put the student.mdb file under the directory of the project, and when I run the program, the compiler showes: does not added:java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data sour ce name not found and no default driver specified
Could anyone tell me how to solve the problem?
BTW, I have already installed AccessDatabaseEngine.exe on my computer.