Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package prode;
- import java.sql.*;
- public class Conexion {
- Connection con;
- Statement st;
- public Conexion(){
- try{Class.forName("com.mysql.jdbc.Driver"); // en el debug llega a esta parte mostrando por class file editor la excepción; en ejecución no lanza errores, llega al catch mostrando conexión no establecida
- con = DriverManager.getConnection("jdbc:mysql://localhost/prodemios?user=root&password=");
- }catch(ClassNotFoundException|SQLException e){
- System.out.println("conexion no establecida");
- }
- }
- }
Add Comment
Please, Sign In to add comment