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: System.String

A String value that specifies the type of data type.

schema
Type: System.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]::
Return to top
Show: