Question : No Suitable Driver Found

Hi Experts ..

I have the following code
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
// load the DB2 Driver
Class class1 = Class.forName("COM.ibm.db2.jdbc.app.DB2Driver");
//Db data = new Db();
// Get the connection with authentication
Connection connection = DriverManager.getConnection(url, user,
password);

// Disable auto-commit mode
connection.setAutoCommit(false);

return connection;


I am getting this error:
1:
2:
3:
4:
5:
6:
Caused by: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:545)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at com.ibm.lims.databaseobject.impl.BaseDAO.getConnection(BaseDAO.java:82)
... 20 more

I have db2java.jar in my eclipse project build path.

What else should I do to make it work?
Thx!

Answer : No Suitable Driver Found

Looks like the connection string is wrong
Random Solutions  
 
programming4us programming4us