File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Connecting Oracle 8x Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Connecting Oracle 8x" Watch "Connecting Oracle 8x" New topic

Connecting Oracle 8x

Uday Kumar

Joined: Jan 22, 2002
Posts: 24
I need some help in connecting to my Oracle database. This db server is on a machine in my network and my java class runs on my laptop(WinNT) using JDK1.3 and latest JDBC drivers.
I have set my classpath to include and and imported oracle.jdbc.driver.* in my class code. The code compiles fine but when executed thru DOS prompt I get the following error:-

Exception in thread "main" java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at Test.main(
<code snippet>
String url = "";
String driver = "oracle.jdbc.driver.OracleDriver";
Connection conn= DriverManager.getConnection(url, "uid", "password");
</code snippet>

Any help would be highly appreciated.
PS: Keep in mind, I am brand new to Java.
[ March 28, 2002: Message edited by: Uday Kumar ]
Julio Carlos

Joined: Mar 26, 2002
Posts: 9
Hi, i have this code to connect to the Oracle 8.1.7 Database, i'm using JDK 1.2.2, and in my classpath i only have the, this is my code

This work fine, i hope that this help you
[ Edited by Dave to format code and fix ]
[ April 01, 2002: Message edited by: David O'Meara ]
Uday Kumar

Joined: Jan 22, 2002
Posts: 24
Thanks for your help Julio Carlos :-). Since, I was out of town, I could not reply sooner.
I agree. Here's the link:
subject: Connecting Oracle 8x
It's not a secret anymore!