急:如何解决无效的游标状态?
											    strSQL="select * from ProductIn";
    //如果名称的查询条件不为空
    if(jTextFieldname.getText().trim().length()==0){}
    else{
      strSQL=strSQL+"where Name like '"+jTextFieldname.getText().trim()+"'";
    }
    rs=db.getResult(strSQL);
    try{
      //判断返回的结果集是否为空,若不为空显示记录
      if(rs.equals(null)){
        JOptionPane.showMessageDialog(null,"无入库信息!");
        return;
      }
      else{
        rs.next();
        showResult();//显示当前记录
      }
    }
    catch(SQLException ex){}
   当ProductIn表中有记录时可正常执行,但是当无记录时就会提示“无效的游标状态”
   请问应该怎么解决???



 
											





 
	    

 
	

