Share via


SqlDataReader.GetSqlVector<T>(Int32) Method

Definition

Gets the value of the specified column as a SqlVector<T>.

public:
generic <typename T>
 where T : value class virtual Microsoft::Data::SqlTypes::SqlVector<T> GetSqlVector(int i);
public virtual Microsoft.Data.SqlTypes.SqlVector<T> GetSqlVector<T>(int i) where T : struct;
abstract member GetSqlVector : int -> Microsoft.Data.SqlTypes.SqlVector<'T (requires 'T : struct)> (requires 'T : struct)
override this.GetSqlVector : int -> Microsoft.Data.SqlTypes.SqlVector<'T (requires 'T : struct)> (requires 'T : struct)
Public Overridable Function GetSqlVector(Of T As Structure) (i As Integer) As SqlVector(Of T)

Type Parameters

T

Parameters

i
Int32

Returns

A SqlVector<T> object representing the column at the given ordinal.

Exceptions

The index passed was outside the range of 0 to FieldCount - 1

An attempt was made to read or access columns in a closed SqlDataReader.

The retrieved data is not compatible with the SqlVector<T> type.

Remarks

No conversions are performed; therefore, the data retrieved must already be a vector value, or an exception is generated.

Applies to