Export (0) Print
Expand All

DataType Constructor (SqlDataType, String, String)

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

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

public DataType(
	SqlDataType sqlDataType,
	string type,
	string schema
)

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.
schema
Type: String
A String value that specifies the schema of the 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]::
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft