steps to connect with Oracle Databse using TYPE-2 Jdbc driver.
Answers were Sorted based on User's Feedback
Answer / 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 |
we can connect with oracle DB using Type-2(partial native
and partial Java)
use driver :
oracle.jdbc.driver.OracleDriver
use URL:
jdbc:oracle:ocis:@hostname:port no:global source name
Dependig on port name and localhost URL will look like
(jdbc:oracle:ocis:@localhost:1521:XE)
XE is global source name Oracle 10g
| Is This Answer Correct ? | 5 Yes | 2 No |
Answer / s .p priya
through ms accessi think so but as most of the type 2
drivers r system dependent we cannot connect other
database or it is possible only if it oracle os
| Is This Answer Correct ? | 4 Yes | 2 No |
Explain implementation and how is it different from conversion?
Which package is imported by default?
Explain what is Marker interface?
What are the two ways you can synchronize a block of code?
When should the method invokelater() be used?
Can we increase size of array?
How to sort a vector elements that contains the user define class object? (Note: If Suppose consider, A Student class contain two data members. They are String studentName and int rollNo. I am creating Four objects for this class, each object contains students details like name and roll no. Now i am storing that objects in vector and if i retiving the elements from the vector means then it should be display in sorting order)
3 Answers ProdEx Technologies,
How can you eliminate duplicates?
Can I learn java in 3 months?
What will happens if you opened Internet Explorer 4 times?
What is a boolean in java?
Is final static java?