日期:2014-05-18  浏览次数:20736 次

JSP报错,不知道提示是什么意义
insert   t_apply   (aID,hID,rID,adate1,areason,astate)   values( '5 ', '2 ', '2 ', '2007-2-2   12:05:34 ', 'fds ', '0 ')2007-2-2   12:07:38   org.apache.catalina.core.StandardWrapperValve   invoke
严重:   Servlet.service()   for   servlet   jsp   threw   exception
java.lang.NoSuchMethodError:   com.syc.db.Db.inserapply(Ljava/lang/String;)V

------解决方案--------------------
public void inserapply(String sql){
try{
Statement stat = conn.createStatement();
ResultSet rs = stat.executeQuery(sql);
stat.executeUpdate(sql);
}catch(Exception e){
e.printStackTrace();
}

不应该这么写吧

public void inserapply(String sql){
try{
Statement stat = conn.createStatement();
stat.executeUpdate(sql);
}catch(Exception e){
e.printStackTrace();
}