Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static Connection Connerdb()
- {
- try{
- Class.forName("com.mysql.jdbc.Driver");
- Connection con=DriverManager.getConnection( "jdbc:mysql://localhost/TestDB",root, " " );
- return con;
- }
- catch (ClassNotFoundException | SQLException e){
- JOptionPane.showMessageDialog(null, e);
- return null;
- }
- }
Add Comment
Please, Sign In to add comment