Server.SystemDataTypes Server.SystemDataTypes Server.SystemDataTypes Property

Definition

Represents a collection of SystemDataType objects. Each SystemDataType object represents a system data type defined on the instance of SQL Server.

public:
 property Microsoft::SqlServer::Management::Smo::SystemDataTypeCollection ^ SystemDataTypes { Microsoft::SqlServer::Management::Smo::SystemDataTypeCollection ^ get(); };
[Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcObject(Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcContainerRelationship.ObjectContainer, Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcContainerCardinality.ZeroToAny, typeof(Microsoft.SqlServer.Management.Smo.SystemDataType))]
public Microsoft.SqlServer.Management.Smo.SystemDataTypeCollection SystemDataTypes { get; }
Public ReadOnly Property SystemDataTypes As SystemDataTypeCollection
Property Value

A SystemDataTypeCollection object that represents all the system data types defined on the instance of SQL Server.

Examples

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  
}  

Remarks

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.

Applies to