object GetValue (int i)
{
ValidateState ();
EnsureDataAvailable ();
if (i < 0 || i >= command.Tds.Columns.Count)
throw new IndexOutOfRangeException ();
try {
if ((command.CommandBehavior & CommandBehavior.SequentialAccess) != 0) {
return ((Tds)command.Tds).GetSequentialColumnValue (i);
}
} catch (TdsInternalException ex) {
command.Connection.Close ();
throw SqlException.FromTdsInternalException ((TdsInternalException) ex);
}
return command.Tds.ColumnValues [i];
}