Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
DataType Constructor (SqlDataType, String)

DataType Constructor (SqlDataType, String)

Initializes a new instance of the DataType class based on a specified SQL Server data type with the specified type.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

public DataType(
	SqlDataType sqlDataType,
	string type
)

Parameters

sqlDataType
Type: Microsoft.SqlServer.Management.Smo.SqlDataType
A SqlDataType object value that specifies the SQL Server data type.
type
Type: String
A String value that specifies the type of data type.

Visual Basic

'Declare and create a DataType object variable.
Dim dt As DataType
dt = New DataType(SqlDataType.

PowerShell

$dt = new-object Microsoft.SqlServer.Management.Smo.DataType([Microsoft.SqlServer.Management.Smo.SqlDataType]::

Community Additions

ADD
Show:
© 2015 Microsoft