Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private Persistencia() {
- base = BaseDatos.getInstancia();
- base.conectar("jdbc:mysql://localhost/dda", "root", "1234");
- }
- public void conectar(String url,String u,String p){
- try {
- conexion = DriverManager.getConnection(url, u, p);
- stmt = conexion.createStatement();
- } catch (SQLException ex) {
- System.out.println("Error al conectar:" + ex.getMessage());
- }
- }
Add Comment
Please, Sign In to add comment