SqlDataRecord.GetDataTypeName(Int32) SqlDataRecord.GetDataTypeName(Int32) SqlDataRecord.GetDataTypeName(Int32) SqlDataRecord.GetDataTypeName(Int32) Method

定义

返回序号参数指定的列的数据类型名称。Returns the name of the data type for the column specified by the ordinal argument.

public:
 virtual System::String ^ GetDataTypeName(int ordinal);
public virtual string GetDataTypeName (int ordinal);
abstract member GetDataTypeName : int -> string
override this.GetDataTypeName : int -> string
Public Overridable Function GetDataTypeName (ordinal As Integer) As String

参数

ordinal
Int32 Int32 Int32 Int32

从零开始的列序号。The zero-based ordinal of the column.

返回

包含列的数据类型的 StringA String that contains the data type of the column.

实现

异常

ordinal 小于 0 或大于列数(即 FieldCount)。The ordinal is less than 0 or greater than the number of columns (that is, FieldCount).

注解

此方法返回 SQL Server 类型系统中已知的类型名称。This method returns the type name as known in the SQL Server type-system. 对于用户定义的类型 (Udt), 它返回由三部分组成的名称, 该名称用于在 SQL Server 注册类型。For user-defined types (UDTs), it returns the three-part name that was used to register the type with SQL Server.

适用于