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
}