private Connection ConnectDB() {
String strURL = "";
String strUser = "";
String strPW = "";
strURL = "jdbc:oracle:thin:@IP:PORT:orcl";
strUser = "사용자";
strPW = "비밀번호";
Connection conn = null;
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
conn = DriverManager.getConnection(strURL, strUser, strPW);
System.out.println("DB Connect OK!!");
} catch (Exception e) {
System.out.println("ERROR !!!!!!!!!!!!!!!!!!!");
System.out.println(e.getMessage());
} finally {
// try { if(conn != null) conn.close(); } catch(Exception ee) { }
}
return conn;
}