String sql ="select count(cyxxbid) cot from yjb where cyxxbid='"+cyid+"'";

解决方案 »

  1.   

    yjb.setCyxxbid(new Long(rs.getLong("Cyxxbid")));
    yjb.setYjbid(new Long(rs.getLong("yjbid")));这两句都有错,用BigDecimal试试,Long只是长整型
      

  2.   

    ResultSet can not re-read row data for column 1select * from yjb where yjbid ="+yjbid
    改为:select bt,Cyxxbid,fjbs,fjbs,nr,sj,sjr,yjbid,zt from yjb where yjbid ="+yjbid
      这样肯定就可以了 我也遇到过这样的问题!
      

  3.   

    ResultSet是一个FORWARD的结果集,由于你前面OPEN的都是同一个公共变量RS后没CLOSE,造成ResultSet的游标仍然指在前一个ResultSet的最后一行,无法重新回到FIRST。你试试把所有的RS用后都立即CLOSE了