java连接Access数据库问题
public Connection getConnection()
{
String url="jdbc:odbc:driver={MicroSoft Access Driver (*.mdb)};DBQ=D:\\xxx.mdb" ;
String user = "";
String password = "1234";
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
} catch (java.lang.ClassNotFoundException e) {
}
try {
con = DriverManager.getConnection(url,user,password);
} catch (SQLException ex) {
}
return con;
}