Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are the three parts of a lambda expression? What is the type of lambda expression?

1015


How to perform binary search in java?

984


Where can I find jdk in my computer?

957


I want to persist data of objects for later use. What’s the best approach to do so?

911


Explain java coding standards for methods?

1023


what state does a thread enter when it terminates its processing? : Java thread

1038


What is compiler and what its output.

1129


What is sizeof () operator?

955


Tell us something about an iterator.

939


How do you access command-line arguments within the code?

1039


What is the disadvantage of java?

935


What is java autoboxing?

931


What is a byte array?

1080


What is command line argument in java?

1132


What is boolean used for?

1009