Advertisement
Guest User

Untitled

a guest
Nov 16th, 2017
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.35 KB | None | 0 0
  1. Connection connection = null;
  2.     try {
  3.     connection=DriverManager.getConnection(
  4. "jdbc:postgresql://teachdb.cs.rhul.ac.uk/CS2855/<your username>",  
  5. user, password);
  6.      } catch (SQLException e) {
  7.     System.out.println("Connection Failed! Check output console");
  8.     e.printStackTrace();
  9.     }
  10.     return connection;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement