class='"+nclass+"'");
少引号:
class="'"+nclass+"'");

解决方案 »

  1.   

    服务器报错:Error 500--Internal Server Error 
    From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
    10.5.1 500 Internal Server Error
    The server encountered an unexpected condition which prevented it from fulfilling the request.
     
      

  2.   

    String nclass=new String
    String SQL=new String
    最好不要再循环里面定义变量
      

  3.   

    String SQL;
    SQL="select count (*) from xxzcxx where class="+nclass;
    ResultSet rs=stmt.executeQuery(SQL);
      

  4.   

    try:String SQL=new String("select count (*) as cnt from xxzcxx where class='"+nclass+"'");
    ResultSet rs=stmt.executeQuery(SQL);
    if(rs.next()) count = rs.getInt("cnt");