DataType 建構函式 (SqlDataType)
Initializes a new instance of the DataType class based on a specified SQL Server data type.
命名空間: Microsoft.SqlServer.Management.Smo
組件: Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)
語法
'宣告
Public Sub New ( _
sqlDataType As SqlDataType _
)
'用途
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
)
參數
- sqlDataType
型別: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)