Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static Connection getConnection(String username, String pw) {
- Connection con = null;
- try {
- Class.forName("oracle.jdbc.driver.OracleDriver");
- con = DriverManager.getConnection(
- "jdbc:oracle:thin:@datdb.cphbusiness.dk:1521:dat", username, pw);
- } catch (SQLException ex) {
- System.out.println("[HELPER CLASS] SQL ERROR: " + ex.getMessage());
- } catch (ClassNotFoundException cnfe) {
- System.out.println("[HELPER CLASS] ClASSNOTFOUND ERROR: "
- + cnfe.getMessage());
- }
- return con;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement