SqlDataReader.GetDataTypeName Method (Int32)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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

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

public override string GetDataTypeName(
	int i
)

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.

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
Available since 1.1
Return to top
Show: