好简单的问题,大家帮我看看有什么错误
<%
try
{ String sql;
if( "dsk ".equals(request.getParameter( "select "))){
String sql= "select serv_type_,sum(case when serv_state= 'F1N ' then 1 else 0 end) as [xz] from serv6 where cust_gp in ( 'dk ', 'sk ') group by serv_type_ ";
ResultSet rs=connection.executeQuery(sql);
while(rs.next()){
%>
<tr bordercolor= "#6894D5 ">
<td height= "24 "> <div align= "center " class= "style2 "> <%=rs.getString( "serv_type_ ")%> </div> </td>
<td> <div align= "center " class= "style2 "> <%=rs.getString( "xz ")%> </div> </td>
</tr>
<%}}}catch(Exception ex) {}%>
上面的代码我是用来判断表单select的值 如果是dsk的话,就运行下面的查询语句,但不知道出了什么问题,就是会报错,请大家帮忙指正指正。
------解决方案--------------------ResultSet rs=connection.executeQuery(sql);
connection有executeQuery方法吗
------解决方案--------------------那错误发上来啊 有事情发邮件到lws.emmagee@163.com