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 restrictions imposed by a Security Manager on Applets?.

2557


Give any two differences between C++ and java.

1081


What are the limitations of procedural programming approach?

998


What is final keyword?

1086


What is boolean false?

929


Can a list be null in java?

985


What is an object in java and how is it created?

1004


What is the difference between a local variable and an instance variable?

1016


Explain about the select method with an example?

1110


how to write a program for sending mails between client and server

2021


What is get () in java?

972


What is variable and example?

914


Can a static block throw exception?

1046


What do you mean by boolean?

1014


Explain the difference between serializable and externalizable in java?

978