SqlDataRecord.GetDataTypeName(Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Parameters
- ordinal
- Int32
The zero-based ordinal of the column.
Returns
A String that contains the data type of the column.
Implements
Exceptions
The ordinal
is less than 0 or greater than the number of columns (that is, FieldCount).
There is a type mismatch.
Remarks
This method returns the type name as known in the SQL Server type-system. For user-defined types (UDTs), it returns the three-part name that was used to register the type with SQL Server.