关于取结果集的问题
public SumEntity[] findSum(Connection con,String whe) {
ResultSet rs = null;
try {
String sql = "SELECT USER_CD,BUMON_CD,SUM(TIKOKU) AS AA,SUM(SOUTAI) AS BB,SUM(ZANGYOU) AS CC,SUM(KETUKIN) AS DD,SUM(XIUJIA) AS EE,SUM(SYUTYOU) AS FF FROM SYUTUKETU_JOUHOU_003 ";
if(whe!=null&&!(whe.equals( " "))){
sql+=whe;
}
System.out.println(sql);
pstmt = this.sqlSet(con,sql);
rs = this.exeQuery(pstmt);
Vector v = new Vector();
while (rs.next()) {
SumEntity ee = new SumEntity();
ee._tikoku =rs.getDouble( "AA ");
ee._soutai =rs.getDouble( "BB ");
ee._zangyou =rs.getDouble( "CC ");
ee._xiujia =rs.getDouble( "DD ");
ee._syutyou =rs.getDouble( "EE ");
ee._ketukin =rs.getDouble( "FF ");
System.out.println( "ee._tikoku =========== "+ee._tikoku );
v.addElement(ee);
}
int size = v.size();
System.out.println( "size=========== "+size);
SumEntity[] ees = new SumEntity[size];
ees = (SumEntity[])v.toArray(ees);
System.out.println( "ees.length=========== "+ees.length);
for(int i=0;i <ees.length;i++)
{
System.out.println( "0000=========== "+ees[i]._tikoku);
}
return ees;
} catch (MissingFindException misse) {
throw new MissingFindException( "ERROR ");
} catch (OracleException orae) {
st = orae.getStatus();
throw new OracleException(st);
} catch (
SQLException sqle) {
throw new OracleException(sqle);
} catch (Exception e) {
throw new OriginalException(e);
} finally {
try {
if (rs != null) rs.close();
if (pstmt != null)