private CachedRowSet buildCachedRow() throws SQLException {
       int iColCount;
       CachedRowSetImpl crsRow = new CachedRowSetImpl();

       RowSetMetaDataImpl rsmd = new RowSetMetaDataImpl();
       RowSetMetaDataImpl rsmdWrite = (RowSetMetaDataImpl)crsSync.getMetaData();
       RowSetMetaDataImpl rsmdRow = new RowSetMetaDataImpl();

       iColCount = rsmdWrite.getColumnCount();
       rsmdRow.setColumnCount(iColCount);

       for(int i =1;i<=iColCount;i++) {
          rsmdRow.setColumnType(i,rsmdWrite.getColumnType(i));
          rsmdRow.setColumnName(i,rsmdWrite.getColumnName(i));
          rsmdRow.setNullable(i,ResultSetMetaData.columnNullableUnknown);

          try {
             rsmdRow.setCatalogName(i, rsmdWrite.getCatalogName(i));
             rsmdRow.setSchemaName(i, rsmdWrite.getSchemaName(i));
          } catch(SQLException e) {
               e.printStackTrace();
          }
        } //end for

       crsRow.setMetaData(rsmdRow);

       crsRow.moveToInsertRow();

       for(int col=1;col<=crsSync.getMetaData().getColumnCount();col++) {
           crsRow.updateObject(col, crsSync.getObject(col));
       }

       crsRow.insertRow();
       crsRow.moveToCurrentRow();

       crsRow.absolute(1);
       crsRow.setOriginalRow();

      try {
          crsRow.setUrl(crsSync.getUrl());
      } catch(SQLException sqle) {

      }

      try {
          crsRow.setDataSourceName(crsSync.getCommand());
       } catch(SQLException sqle) {

       }

       try {
           if(crsSync.getTableName()!= null){
              crsRow.setTableName(crsSync.getTableName());
           }
        } catch(SQLException sqle) {

        }

       try {
            if(crsSync.getCommand() != null)
                crsRow.setCommand(crsSync.getCommand());
       } catch(SQLException sqle) {

       }

       try {
            crsRow.setKeyColumns(crsSync.getKeyColumns());
       } catch(SQLException sqle) {

       }
       return crsRow;
    }
This function builds a row  as a <code>CachedRowSet</code> object
which has been resolved and is ready to be synchrinized to the datasource

@throws SQLException if there is problem in building
        the metadata of the row.
src/main/java/org/replicadb/rowset/sun/rowset/internal/SyncResolverImpl.java