public void dbrSQL(String rID, String rSql) throws SysExcpt {
        ResultSet lRSet;        try {
            Statement lStat = gConn.createStatement();
            lRSet = lStat.executeQuery(rSql);
            if (lRSet.next()) {
               dbrSuccess();
            }
            else {
               dbrEndOfData();
            }            if (rID == null) {
               gRSet = lRSet;
               gStat = lStat;
            }
            else {
               gRSetHash.put(rID, lRSet);
               gStatHash.put(rID, lStat);
            }
        }
        catch (SQLException e) {
            dbrAnalyzeERO(e);
            if (dbrIsFatal()) {
               throw new SysExcpt("DBase", "dbrSQL()", e.toString());
            }
        }
    }

解决方案 »

  1.   

    http://www.csdn.net/expert/topic/906/906584.xml?temp=.3783686
      

  2.   

    String[] dbColumnNames = {};
    ResultSetMetaData metadata = null;metadata = rs.getMetaData();
    int columnCount = metadata.getColumnCount();
    dbColumnNames = new String[columnCount];for(int i = 0; i < columnCount; i++) {
    dbColumnNames[i] = metadata.getColumnName(i + 1);
    }rs.last();
    int rowCount = rs.getRow() 
    HashMap oMap = new HashMap[rowCount];
    rs.first();
    for (int i=0;i<rowCount;i++) {
    for (int j = 1; j <= columnCount; j++) {
    oMap[i].put(dbColumnNames[j], rs.getObject(j));
    }
    rs.next()
    }
      

  3.   

    zhangzgsky (忧伤的紫雨)  :
    什么时候也开始用java了:)楼上的就可以了!