Advertisement
Guest User

Untitled

a guest
Sep 19th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. public class Taj
  2. {
  3. public static void main (String argv[])
  4. {
  5. try
  6. {
  7. String url="jdbc:postgresql://localhost:5432/gestionconges";
  8. String user="gestionnaire_conges";
  9. String passwd="conges";
  10. System.out.println("Trynig to connect ...");
  11. java.sql.Connection connection=java.sql.DriverManager.getConnection (url, user, passwd);
  12. System.out.println("I am connected");
  13. java.sql.Statement statement=connection.createStatement();
  14. }
  15. catch (java.sql.SQLException e)
  16. {
  17. e.printStackTrace();
  18. }
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement