Share via


SystemDataTypes 屬性

表示 SystemDataType 物件的集合。每個 SystemDataType 物件代表在 SQL Server 執行個體上定義的系統資料類型。

命名空間:  Microsoft.SqlServer.Management.Smo
組件:  Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)

語法

'宣告
<SfcObjectAttribute(SfcContainerRelationship.ObjectContainer, SfcContainerCardinality.ZeroToAny,  _
    GetType(SystemDataType))> _
Public ReadOnly Property SystemDataTypes As SystemDataTypeCollection
    Get
'用途
Dim instance As Server
Dim value As SystemDataTypeCollection

value = instance.SystemDataTypes
[SfcObjectAttribute(SfcContainerRelationship.ObjectContainer, SfcContainerCardinality.ZeroToAny, 
    typeof(SystemDataType))]
public SystemDataTypeCollection SystemDataTypes { get; }
[SfcObjectAttribute(SfcContainerRelationship::ObjectContainer, SfcContainerCardinality::ZeroToAny, 
    typeof(SystemDataType))]
public:
property SystemDataTypeCollection^ SystemDataTypes {
    SystemDataTypeCollection^ get ();
}
[<SfcObjectAttribute(SfcContainerRelationship.ObjectContainer, SfcContainerCardinality.ZeroToAny, 
    typeof(SystemDataType))>]
member SystemDataTypes : SystemDataTypeCollection
function get SystemDataTypes () : SystemDataTypeCollection

屬性值

型別:Microsoft.SqlServer.Management.Smo. . :: . .SystemDataTypeCollection
SystemDataTypeCollection 物件,代表在 SQL Server 執行個體上定義的所有系統資料類型。

備註

The SystemDataTypes property points to the SystemDataTypeCollection object. You can use the collection to reference the system data types that are available to the instance of SQL Server.

範例

Visual Basic

'Connect to the local, default instance of SQL Server.
Dim srv As Server
srv = New Server
'Display the system data types.
Dim sr As SystemDataType
For Each sr In srv.SystemDataTypes
   Console.WriteLine(sr.Name)
Next

PowerShell

$srv = new-object Microsoft.SqlServer.Management.Smo.Server("(local)")
foreach ($sr in $srv.SystemDataTypes)
{
   Write-Host $sr.Name
}