File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Murach's Java Servlets and JSP
this week in the
An exception with Connection
Joined: Aug 01, 2005
Mar 06, 2013 09:43:06
My code in Widows is:
Class.forName("COM.ibm.db2.jdbc.app.DB2Driver"); Connection conn = DriverManager.getConnection("sluggo", "xxx", "xxx");
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,
Joined: Apr 04, 2006
Mar 06, 2013 10:42:40
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
error with database connection
Problem with wrapping a method in try/catch block
mySQL via EJB in reference implementation
Problem with database connection to ingres
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014