Example #1
0
        /// <summary>
        /// Refills the column lookup table
        /// using the current <see cref="IDataRecord"/>
        /// instance.
        /// </summary>
        protected void UpdateLookupTable()
        {
            _lookup.Clear();

            for (int i = 0; i < _dataRecord.FieldCount; ++i)
            {
                _lookup.Add(i, _dataRecord.GetName(i));
            }
        }
        private static DbFieldLookup CreateLookupTable(IDataRecord record)
        {
            DbFieldLookup lookup = new DbFieldLookup();

            for (int i = 0; i < record.FieldCount; ++i)
            {
                lookup.Add(i, record.GetName(i));
            }

            return(lookup);
        }