Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static Connection getConnection(){
- Connection conn=null;
- try {
- Class.forName("com.mysql.jdbc.Driver");
- } catch (ClassNotFoundException ex) {
- Logger.getLogger(DBconnect.class.getName()).log(Level.SEVERE, null, ex);
- }
- String dburl="jdbc:mysql://localhost/log15tecweb";
- try {
- conn=DriverManager.getConnection(dburl,"root","QWEasd65");
- } catch (SQLException ex) {
- Logger.getLogger(DBconnect.class.getName()).log(Level.SEVERE, null, ex);
- }
- return conn;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement