Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

how to connect java with oracle.please tell some information about JDBC.

  Asked By: Bakir    Date: Jan 04    Category: Java    Views: 999
  

how to connect java with oracle.please tell some information about JDBC.

Share: 

 

4 Answers Found

 
Answer #1    Answered By: Heru Chalthoum     Answered On: Jan 04

You can either go for TYpe 4 driver or make DSN if ur
running on windows and connect  to oracle

 
Answer #2    Answered By: Murad Bashara     Answered On: Jan 04

by using jdbc  we will connect  to database in java.
first u have to load driver by using Class.forName()
or DriverManager's method. then U have to get
connection by using DriverManager.getConnection().
using connection object u have to create Statement and
then using statement u can execute and query.

 
Answer #3    Answered By: Juan Reynolds     Answered On: Jan 04

you can refer to following site
http://www.javaalmanac.com/egs/index.html and choose
the java.sql package. u will get the required code
there.
JDBC is an API to access the database from java.
basically there are four types of drivers. Type four
is generally preferred. you can get tutorials abt JDBC
on sun`s site

 
Answer #4    Answered By: Rafael Thompson     Answered On: Jan 04

go to the directory where oracle  is installed.
go to jdbc
go to lib

here ull find some zip file.

therel be two files - classes111.zip, nls_charset11.zip

or classes12.zip, nls_charset12.zip

if u find these files simply set the "classpath" variable in system
variables to these two files.

eg d:/oracle/jdbc/lib/classes111.zip
&
d:/oracle/jdbc/lib/nls_charset11.zip

if u dont find these files, take it from someone who has it.

 




Tagged: