Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Connection con;
- Statement stm;
- ResultSet rs;
- {
- try {
- Class.forName("org.gjt.mm.mysql.Driver");
- con = DriverManager.getConnection
- ("jdbc:mysql://localhost/basededatos", "root", "");
- System.out.println("Conexión completa.");
- stm = con.createStatement();
- // rs = stm.executeQuery("SELECT * FROM alumnos");
- con.close();
- } catch (Exception e){
- System.out.println("Error: " + e.getMessage());
- }
- }
- }
Add Comment
Please, Sign In to add comment