我的天.在线等待! must be caught or declared to be thrown写一个try catch 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 这样写 void List(Connection conn ,String father) throw java.sql.SQLException { sql_Category="select * from message_classify where father='"+father+"' order by cid"; stmt=conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY); rs=stmt.executeQuery(sql_Category); sb.append(sql_Category.toString()); } ps : 少打了个s,应该是 throws java.sql.SQLException 就是没有对SQLException进行捕捉。 所有可能出错的代码最好都加上TRY后面写上相应的错误处理THROW ~~~~~~~~~~~~~~~~ 有个问题请教各位 设计模式和框架学习的次序。 JSP 中比较适用的在线编辑器WEBEDITOR,请介绍一个,请附教程 JSP中如何"动态"增加行,高手进来帮帮忙~~~~!~! 问一下如何history.back(-1)的网页过期问题 没网的环境下flexpaper如何添加adobe flash的信任 求一SpringMVC 和 DWR 整合的例子 如何转换为汉字问题 出资收购java语音聊天室 jsp 基本问题 请问JFreeChart的自带的sample哪里有源码 apache 用mod_jk 连接tomcat, 怎样发布servlet? 在win2k 或 Unix 上。
void List(Connection conn ,String father) throw java.sql.SQLException
{
sql_Category="select * from message_classify where father='"+father+"' order by cid";
stmt=conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
rs=stmt.executeQuery(sql_Category);
sb.append(sql_Category.toString());
}
后面写上相应的错误处理THROW ~~~~~~~~~~~~~~~~