Advertisement
Guest User

Untitled

a guest
Mar 25th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. String url = "jdbc:postgresql://localhost/test";
  2. Properties props = new Properties();
  3. props.setProperty("user","fred");
  4. props.setProperty("password","secret");
  5. props.setProperty("ssl","true");
  6. Connection conn = DriverManager.getConnection(url, props);
  7. String url = "jdbc:postgresql://localhost/test?user=fred&password=secret&ssl=true";
  8. Connection conn = DriverManager.getConnection(url);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement