Udostępnij za pośrednictwem


Konstruktor DataType (SqlDataType)

Inicjuje nowe wystąpienie DataType klasy na podstawie określonej SQL Server typu danych.

Przestrzeń nazw:  Microsoft.SqlServer.Management.Smo
Zestaw:  Microsoft.SqlServer.Smo (w Microsoft.SqlServer.Smo.dll)

Składnia

'Deklaracja
Public Sub New ( _
    sqlDataType As SqlDataType _
)
'Użycie
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
)

Parametry

Przykłady

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)