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
)

参数

示例

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)

请参阅

参考

DataType 类

DataType 重载

Microsoft.SqlServer.Management.Smo 命名空间