private int getColIdxByName(String name) throws SQLException {
        RowSetMD = (RowSetMetaDataImpl)this.getMetaData();
        int cols = RowSetMD.getColumnCount();

        for (int i=1; i <= cols; ++i) {
            String colName = RowSetMD.getColumnName(i);
            if (colName != null)
                if (name.equalsIgnoreCase(colName))
                    return (i);
                else
                    continue;
        }
        throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.invalcolnm").toString());

    }
Returns the column number of the column with the given name in this
<code>CachedRowSetImpl</code> object.  This method throws an
<code>SQLException</code> if the given name is not the name of
one of the columns in this rowset.

@param name a <code>String</code> object that is the name of a column in
             this <code>CachedRowSetImpl</code> object
@throws SQLException if the given name does not match the name of one of
        the columns in this rowset
src/main/java/org/replicadb/rowset/sun/rowset/CachedRowSetImpl.java