This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes An exception with Connection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "An exception with Connection" Watch "An exception with Connection" New topic

An exception with Connection

Alejandro Barrero
Ranch Hand

Joined: Aug 01, 2005
Posts: 309
My code in Widows is:

In the ODBC screen I can connect to the data base, but in Java I am getting the exception "java.sql.SQLException: No suitable driver found for sluggo".

Your help will be greatly appreciated,
Alejandro Barrero
T Mishra
Ranch Hand

Joined: Apr 04, 2006
Posts: 108

Your jdbc url seems incorrect - it should be of the format - jdbc:db2://<host>[:<port>]/<database_name> Also, please ensure that the DB2 driver jar files are in the classpath.

Tushar (SCJP 1.5)
subject: An exception with Connection
Similar Threads
Problem with database connection to ingres
error with database connection
Problem with wrapping a method in try/catch block
mySQL via EJB in reference implementation
JDBC Oracle