Exemple #1
0
        public MySqlValue ReadColumnValue(int index)
        {
            if (!usingSequentialAccess || seqColumn == index)
            {
                return(this[index]);
            }

            if (index < seqColumn)
            {
                throw new MySqlException("Invalid attempt to read a prior column using SequentialAccess");
            }

            while ((seqColumn + 1) < index)
            {
                driver.SkipField(values[seqColumn + 1]);
                seqColumn++;
            }

            values[index] = driver.ReadFieldValue(index, fields[index], values[index]);
            seqColumn     = index;
            return(values[index]);
        }