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

Why vector class is used?

942


Explain wait(), notify() and notifyall() methods of object class ?

992


How dead lock situation occurs in java and how you can identify it?

950


What are wrapped classes in java programming?

1030


What is hotjava?

966


Can a class be private in java?

952


What is the r character?

982


What is enhanced loop in java?

949


What are the four integer types supported by java?

993


Are maps ordered java?

905


How do you do absolute value in java?

941


What are heap memory and stack memory and what are memory tables.

938


What is reflexive association?

1721


Should a main method be compulsorily declared in all java classes?

1014


Which types of exceptions are caught at compile time?

990