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 are the three parts of a lambda expression? What is the type of lambda expression?
How to perform binary search in java?
Where can I find jdk in my computer?
I want to persist data of objects for later use. What’s the best approach to do so?
Explain java coding standards for methods?
what state does a thread enter when it terminates its processing? : Java thread
What is compiler and what its output.
What is sizeof () operator?
Tell us something about an iterator.
How do you access command-line arguments within the code?
What is the disadvantage of java?
What is java autoboxing?
What is a byte array?
What is command line argument in java?
What is boolean used for?