Advertisement
Guest User

Untitled

a guest
May 18th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. IO Error: The Network Adapter could not establish the connection
  2.  
  3. public void makeOracleConnection() {
  4. try {
  5. Class.forName("oracle.jdbc.OracleDriver");
  6. oraCon = DriverManager.getConnection("jdbc:oracle:thin:@192.168.1.217:1521:orcl", "hr", "hr");
  7. oraStmt = oraCon.createStatement();
  8. oraRsStmt=oraCon.createStatement(ResultSet.CONCUR_READ_ONLY,ResultSet.TYPE_SCROLL_INSENSITIVE);
  9. } catch (Exception e) {
  10. System.out.println("Error while making connection with Database : " + e.getMessage());
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement