public object GetValue(int i)
        {
            object val = reader.GetSqlValue(i);

            if (val is SqlDecimal)
            {
                SqlDecimal valAsDec = (SqlDecimal)val;
                if (!valAsDec.IsNull)
                {
                    // Fix overflow problems when reading decimals
                    return(SQLServerTypeHelper.FixDecimalPrecision((SqlDecimal)val));
                }
            }
            return(reader.GetValue(i));
        }
 public decimal GetDecimal(int i)
 {
     // Fix overflow problems when reading decimals
     return(SQLServerTypeHelper.FixDecimalPrecision(reader.GetSqlDecimal(i)));
 }