• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Connecting Oracle 8x

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 classes111.zip and classes12.zip 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(Test.java:15)
<code snippet>
String url = "jdbc.oracle.thin:@1.1.1.11:1521:aaaa";
String driver = "oracle.jdbc.driver.OracleDriver";
Class.forName(driver);
Connection conn= DriverManager.getConnection(url, "uid", "password");
</code snippet>

Any help would be highly appreciated.
Uday
PS: Keep in mind, I am brand new to Java.
[ March 28, 2002: Message edited by: Uday Kumar ]
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 classes12.zip, this is my code

This work fine, i hope that this help you
JcSO
[ Edited by Dave to format code and fix ]
[ April 01, 2002: Message edited by: David O'Meara ]
 
Uday Kumar
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your help Julio Carlos :-). Since, I was out of town, I could not reply sooner.
 
Don't MAKE me come back there with this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic