int GetValues (object[] values)
{
ValidateState ();
EnsureDataAvailable ();
if (values == null)
throw new ArgumentNullException ("values");
int len = values.Length;
int bigDecimalIndex = command.Tds.ColumnValues.BigDecimalIndex;
// If a four-byte decimal is stored, then we can't convert to
// a native type. Throw an OverflowException.
if (bigDecimalIndex >= 0 && bigDecimalIndex < len)
throw new OverflowException ();
try {
command.Tds.ColumnValues.CopyTo (0, values, 0,
len > command.Tds.ColumnValues.Count ? command.Tds.ColumnValues.Count : len);
} catch (TdsInternalException ex) {
command.Connection.Close ();
throw SqlException.FromTdsInternalException ((TdsInternalException) ex);
}
return (len < FieldCount ? len : FieldCount);
}