Export (0) Print
Expand All

DataType Constructor (SqlDataType)

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

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

public DataType(
	SqlDataType sqlDataType
)

Parameters

sqlDataType
Type: Microsoft.SqlServer.Management.Smo.SqlDataType
A SqlDataType object variable that specifies the SQL Server system data type.

Visual Basic

Dim dt As DataType
dt = New DataType(SqlDataType.Int)

PowerShell

$dt = new-object Microsoft.SqlServer.Management.Smo.DataType([Microsoft.SqlServer.Management.Smo.SqlDataType]::Int)
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft