SqlDataReader.GetFieldType(Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the Type that is the data type of the object.
public:
override Type ^ GetFieldType(int i);
public:
virtual Type ^ GetFieldType(int i);
public override Type GetFieldType (int i);
public Type GetFieldType (int i);
override this.GetFieldType : int -> Type
abstract member GetFieldType : int -> Type
override this.GetFieldType : int -> Type
Public Overrides Function GetFieldType (i As Integer) As Type
Public Function GetFieldType (i As Integer) As Type
Parameters
- i
- Int32
The zero-based column ordinal.
Returns
The Type that is the data type of the object. If the type does not exist on the client, in the case of a User-Defined Type (UDT) returned from the database, GetFieldType returns null.
Implements
Remarks
This member is an explicit interface member implementation. It can be used only when the SqlDataReader instance is cast to an IDataRecord interface.
This information can be used to increase performance by indicating the strongly-typed accessor to call. (for example, using GetInt32
is roughly ten times faster than using GetValue
.)
Applies to
See also
Pripomienky
https://aka.ms/ContentUserFeedback.
Pripravujeme: V priebehu roka 2024 postupne zrušíme službu Problémy v službe GitHub ako mechanizmus pripomienok týkajúcich sa obsahu a nahradíme ju novým systémom pripomienok. Ďalšie informácie nájdete na stránke:Odoslať a zobraziť pripomienky pre