SqlMetaData Constructor (String, SqlDbType, Int64, Byte, Byte, Int64, SqlCompareOptions, Type, Boolean, Boolean, SortOrder, Int32)

SqlMetaData Constructor (String, SqlDbType, Int64, Byte, Byte, Int64, SqlCompareOptions, Type, Boolean, Boolean, SortOrder, Int32)

 

Initializes a new instance of the SqlMetaData class with the specified column name, type, maximum length, precision, scale, locale ID, compare options, and user-defined type (UDT). This form of the constructor supports table-valued parameters by allowing you to specify if the column is unique in the table-valued parameter, the sort order for the column, and the ordinal of the sort column.

Namespace:   Microsoft.SqlServer.Server
Assembly:  System.Data (in System.Data.dll)

public SqlMetaData(
	string name,
	SqlDbType dbType,
	long maxLength,
	byte precision,
	byte scale,
	long localeId,
	SqlCompareOptions compareOptions,
	Type userDefinedType,
	bool useServerDefault,
	bool isUniqueKey,
	SortOrder columnSortOrder,
	int sortOrdinal
)

Parameters

name
Type: System.String

The name of the column.

dbType
Type: System.Data.SqlDbType

The SQL Server type of the parameter or column.

maxLength
Type: System.Int64

The maximum length of the specified type.

precision
Type: System.Byte

The precision of the parameter or column.

scale
Type: System.Byte

The scale of the parameter or column.

localeId
Type: System.Int64

The locale ID of the parameter or column.

compareOptions
Type: System.Data.SqlTypes.SqlCompareOptions

The comparison rules of the parameter or column.

userDefinedType
Type: System.Type

A Type instance that points to the UDT.

useServerDefault
Type: System.Boolean

Specifes whether this column should use the default server value.

isUniqueKey
Type: System.Boolean

Specifies if the column in the table-valued parameter is unique.

columnSortOrder
Type: System.Data.SqlClient.SortOrder

Specifies the sort order for a column.

sortOrdinal
Type: System.Int32

Specifies the ordinal of the sort column.

For more information, see Table-Valued Parameters.

Universal Windows Platform
Available since 10
.NET Framework
Available since 2.0
Return to top
Show:
© 2016 Microsoft