This documentation is archived and is not being maintained.

IDataRecord.GetDataTypeName Method

Gets the data type information for the specified field.

[Visual Basic]
Function GetDataTypeName( _
   ByVal i As Integer _
) As String
[C#]
string GetDataTypeName(
   int i
);
[C++]
String* GetDataTypeName(
   int i
);
[JScript]
function GetDataTypeName(
   i : int
) : String;

Parameters

i
The index of the field to find.

Return Value

The data type information for the specified field.

Exceptions

Exception Type Condition
IndexOutOfRangeException The index passed was outside the range of 0 through FieldCount.

Remarks

The data type information can differ from the type information returned by GetFieldType, especially where the underlying data types do not map one for one to the runtime types supported by the language. (e.g. DataTypeName may be "integer", while Type.Name may be "Int32".)

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: