This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes JDBC and Relational Databases 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 REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
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: 327
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)
I agree. Here's the link:
subject: An exception with Connection
It's not a secret anymore!