Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: JDBC/Oracle 7

Re: JDBC/Oracle 7

From: Toru Okumura <toru_at_Millet.okunet.kanagawa.yokohama.jp>
Date: 1998/02/11
Message-ID: <TORU.98Feb11223404@Millet.okunet.kanagawa.yokohama.jp>#1/1

The file of doc/jdbc.htm in the JDBC package says,

The driver name is "oracle.jdbc.driver.OracleDriver" if you select the jdbc thin driver, and "oracle.jdbc.dnlddriver.OracleDriver" if you select the jdbc thin-1.0.2 driver.

And, URL is "jdbc:oracle:thin:@yourhost:port_number:SID" if you select the jdbc thin driver, and "jdbc:oracle:dnldthin:@yourhost: port_number:SID" if you select the jdbc thin-1.0.2 driver.

So, I think that you should set the followings:

> 1/ for loading the driver:
> Class.forName("....");

-> Class.forName("oracle.jdbc.driver.OracleDriver");

> 2/ making the connection:
> Connection con =
> DriverManager.getConnection("...","myLogin","myPassword");

-> DriverManager.getConnection("jdbc:oracle:thin:@yourhost:port_number:SID",

                                  "yourLogin","yourPassword");

You can see the way to connect to database with jdbc in "Database Programming with JDBC and JAVA" O'Reilly Book.

I hope your success.

Thanks,

                                 toru_at_okunet.kanagawa.yokohama.jp
                                          Toru  Okumura 
--
                                 toru_at_okunet.kanagawa.yokohama.jp
                                          Toru  Okumura 
Received on Wed Feb 11 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US