Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.sql.Connection;
- import java.sql.DriverManager;
- import java.sql.SQLException;
- public class Conexion {
- private final static String user = "root";
- private final static String password = "";
- static Connection connection = null;
- public static Connection getConexion(String value) throws SQLException, InstantiationException, IllegalAccessException, ClassNotFoundException {
- Class.forName("com.mysql.jdbc.Driver");
- connection = DriverManager.getConnection("jdbc:mysql://localhost/agenciabus", user, password);
- return connection;
- }
- }
Add Comment
Please, Sign In to add comment