我正在使用 Tomcat 7、Eclipse juno、db2 v10.1 我已将 db2jcc.jar 和 db2jcc4.cc 放在 WEB-INF/lib 和 tommcat 库中。我收到此错误 java.sql.SQLException: No suitable driver found for dburl,admin123,admin123 我写的代码是:public String execute()
{
try{
Class.forName("com.ibm.db2.jcc.DB2Driver");
String dbURL = "jdbc:db2:localhost:50000/EEMS";
java.sql.Connection con =DriverManager.getConnection("dburl,admin123,admin123");
String s = "insert into detail values(?,?,?)";
PreparedStatement ps=con.prepareStatement(s);
ps.setInt(1, beanobject.getAge());
ps.setString(2, beanobject.getUname());
ps.setString(3, beanobject.getSex());
ps.executeUpdate();
con.commit();
ps.close();
con.close();
}
catch(Exception e){
e.printStackTrace();
}
return SUCCESS;
}
请帮忙!!