Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Connection conectar() {
- try {
- Class.forName("com.mysql.jdbc.Connection");
- this.conexion = (Connection) DriverManager.getConnection(this.url,this.usuario,this.password);
- if (this.conexion != null) {
- return this.conexion;
- }
- }
- catch(SQLException ex) {
- System.out.println("Hubo un problema al intentar conectarse con la base de datos "+this.url);
- }
- catch(ClassNotFoundException ex) {
- System.out.println(ex);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement