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

Home -> Community -> Usenet -> c.d.o.server -> database connection with JDBC

database connection with JDBC

From: <dongbo_at_my-deja.com>
Date: Wed, 25 Oct 2000 16:01:03 GMT
Message-ID: <8t703q$g79$1@nnrp1.deja.com>

Hi,

I'm new to JDBC and Oracle. I'm trying to access an Oracle8.1.6 server (NT) from another NT box by using jdbc-thin.

First, registered the driver, which looked OK: DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());

Then, tried to connect to the database server, using Connection c = DriverManager.getConnection(

		  "jdbc:oracle:thin://42.221.200.200:1521/dw1",

"username",
"userID");

here, "dw1" is my database name. This failed.

Can anybody tell me, what's wrong with my code?

By the way, if I want to load db driver (thin) from method Class.forName(String s), what s will look like.

I greatly appreciate all the answers/suggestions. Thanks.

Dongbo Liao
dliao_at_crl.nmsu.edu

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Oct 25 2000 - 11:01:03 CDT

Original text of this message

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