try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String db="jdbc:odbc:Driver=Microsoft Access Driver (*.mdb, *.accdb);DBQ=C:/Users/alvaro/Documents/aviones.accdb";
Connection cn=DriverManager.getConnection(db,"","");
JOptionPane.showMessageDialog(rootPane,"Conexion correcta");
} catch (Exception ex) {
JOptionPane.showMessageDialog(rootPane, "El error es "+ex);
}
No hay comentarios:
Publicar un comentario