Share via


Constructeur DataType (SqlDataType)

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

Espace de noms :  Microsoft.SqlServer.Management.Smo
Assembly :  Microsoft.SqlServer.Smo (en Microsoft.SqlServer.Smo.dll)

Syntaxe

'Déclaration
Public Sub New ( _
    sqlDataType As SqlDataType _
)
'Utilisation
Dim sqlDataType As SqlDataType

Dim instance As New DataType(sqlDataType)
public DataType(
    SqlDataType sqlDataType
)
public:
DataType(
    SqlDataType sqlDataType
)
new : 
        sqlDataType:SqlDataType -> DataType
public function DataType(
    sqlDataType : SqlDataType
)

Paramètres

Exemples

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)