steps to connect with Oracle Databse using TYPE-2 Jdbc driver.
Answer Posted / nigel
[NOTE: This description is for oracle 10g]
Step 1: Set the classpath to the oracle driver in your
oracle_home directory
eg:CLASSPATH=C:\oraclexe\app\oracle\product\10.2.0\server\jdbc\lib\ojdbc14.jar;
Step 2: USE -- Class.forName("oracle.jdbc.OracleDriver");
Step 3: USE jdbc url =
("jdbc:oracle:oci:USERNAME/PASSWORD@localhost:1521:XE");
In My Case it was : USERNAME=hr PASSWORD=hr
The rest of the code is similar to jdbc:odbc connection.
just compile and run the code.....:D
| Is This Answer Correct ? | 7 Yes | 1 No |
Post New Answer View All Answers
What is the biggest integer?
What is the synchronized method modifier?
What is use of valueof () in java?
Difference between string, string builder, and string buffer?
What 4 doubled?
Is string is a class in java?
What is derived datatype?
What is parameter example?
What is the difference amongst jvm spec, jvm implementation, jvm runtime ?
What do you mean by platform independence?
If we don’t want some of the fields not to serialize how to do that?
What is the use of StringTokenizer class?
Why java does not support pointers?
Is an empty arraylist null?
what is meant wrapper classes?