This documentation is archived and is not being maintained.
IDataRecord.GetFieldType Method
.NET Framework 1.1
Gets the Type information corresponding to the type of Object that would be returned from GetValue.
[Visual Basic] Function GetFieldType( _ ByVal i As Integer _ ) As Type [C#] Type GetFieldType( int i ); [C++] Type* GetFieldType( int i ); [JScript] function GetFieldType( i : int ) : Type;
Parameters
- i
- The index of the field to find.
Return Value
The Type information corresponding to the type of Object that would be returned from GetValue.
Exceptions
| Exception Type | Condition |
|---|---|
| IndexOutOfRangeException | The index passed was outside the range of 0 through FieldCount. |
Remarks
This information can be used to increase performance by indicating the strongly-typed accessor to call. (e.g. using GetInt32 is roughly ten times faster than using GetValue.)
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework
See Also
IDataRecord Interface | IDataRecord Members | System.Data Namespace
Show: