Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: JDBC/Oracle 7
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 OkumuraReceived on Wed Feb 11 1998 - 00:00:00 CST
![]() |
![]() |