DataType.SqlDataType Property

 

Applies To: SQL Server 2016 Preview

Gets a data type that specifies the SqlDataType definition used in the data type.

Namespace:   Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Syntax

public SqlDataType SqlDataType { get; set; }
public:
property SqlDataType SqlDataType {
    SqlDataType get();
    void set(SqlDataType value);
}
member SqlDataType : SqlDataType with get, set
Public Property SqlDataType As SqlDataType

Property Value

Type: Microsoft.SqlServer.Management.Smo.SqlDataType

A SqlDataType object value that specifies an SqlDataType definition in the data type.

Examples

Legacy Code Example

Visual Basic

Dim dt As DataType
dt = New DataType(SqlDataType.Int)
Console.WriteLine(dt.SqlDataType.ToString())

PowerShell

$dt = new-object Microsoft.SqlServer.Management.Smo.DataType([Microsoft.SqlServer.Management.Smo.SqlDataType]::Int)
Write-Host $dt.SqlDataType

See Also

DataType Class
Microsoft.SqlServer.Management.Smo Namespace

Return to top