What is the code to connect Oracle server in Java. Plz give me the code. Thank U.

Questions by questioninterest

Showing Answers 1 - 1 of 1 Answers

TINTIN

  • Aug 10th, 2006
 

Connection connection = null;

log.debug("<getConnection>");

try {

Class.forName("oracle.jdbc.OracleDriver");

} catch (ClassNotFoundException e) {

log.warn("Could not find driver class: " + driver);

log.warn("Will try to open database connection without driver");

}

String url=jdbc:oracle:thin:@DB_NAME:1521:SCHEMA

connection = DriverManager.getConnection(url, user, password);

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions