Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
GetDataTypeName Method

SqlDataReader.GetDataTypeName Method

Gets a string representing the data type of the specified column.

Namespace:  System.Data.SqlClient
Assembly:  System.Data (in System.Data.dll)

abstract GetDataTypeName : 
        i:int -> string  
override GetDataTypeName : 
        i:int -> string

Parameters

i
Type: System.Int32

The zero-based ordinal position of the column to find.

Return Value

Type: System.String
The string representing the data type of the specified column.

Implements

IDataRecord.GetDataTypeName(Int32)

Returns the name of the back-end data type.

numeric is a synonym in SQL Server for the decimal data type. GetDataTypeName will return "decimal" for a column defined as either decimal or numeric.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft