Link to home
Start Free TrialLog in
Avatar of spiderman19
spiderman19

asked on

Connectivity to Oracle

Hi all, i have expereicen in conecting to IBM Db2, but not oracle,

Can anyone share me the way to connect to oraacle databse.

TQ.

try {

Class.forName("what is the name").newInstance();
Connection conn = DriverManager.getConnection("what is the path");

}

thank you
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Here is another example

>>Class.forName("what is the name").newInstance();
oracle.jdbc.driver.OracleDriver
>>Connection conn = DriverManager.getConnection("what is the path");
jdbc:oracle:thin:@(description=(address=(host=database_ip)(protocol=tcp)(port=1521))(connect_data=(sid=database_instance_name)))

But make sure you have OracleDriver include to classpath.
thanks mate :)