Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.sql.Connection;
- import java.sql.DriverManager;
- public class Connect {
- public static void main(String[] args) {
- try {
- Class.forName("org.postgresql.Driver");
- System.out.println("Driver O.K.");
- String url = "jdbc:postgresql://localhost:5432/Login-Dashboard";
- String user = "postgres";
- String passwd = "899122ekaq";
- Connection conn = DriverManager.getConnection(url, user, passwd);
- System.out.println("Connexion effective !");
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement