Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> database connection with JDBC
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");
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