Поделиться через


SubscriptionClass Constructor ()

Parameterless constructor that creates a new instance of the SubscriptionClass class.

Пространство имен: Microsoft.SqlServer.Management.Nmo
Сборка: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Синтаксис

'Декларация
Public Sub New
public SubscriptionClass ()
public:
SubscriptionClass ()
public SubscriptionClass ()
public function SubscriptionClass ()

Замечания

Изменения текста5 декабря 2005 г.

Изменения образцов кода5 декабря 2005 г.

If you use the default constructor, you must immediately set the Name property and then set the Parent property. You can then set other properties, such as the required FileGroup property.

Пример

The following examples show how to use this default constructor to create a subscription class and add it to an application:

// Create a subscription class and set required properties.
SubscriptionClass flightSubscriptions = new SubscriptionClass();
flightSubscriptions.Name = "FlightSubscriptions";
flightSubscriptions.Parent = myApplication;
flightSubscriptions.FileGroup = "PRIMARY";
' Create a subscription class and set required properties.
Dim flightSubscriptions As SubscriptionClass = New SubscriptionClass()
flightSubscriptions.Name = "FlightSubscriptions"
flightSubscriptions.Parent = myApplication
flightSubscriptions.FileGroup = "PRIMARY"

Платформы

Платформы разработки

Список поддерживаемых платформ см. в разделе Hardware and Software Requirements for Installing SQL Server 2005.

Целевые платформы

Список поддерживаемых платформ см. в разделе Hardware and Software Requirements for Installing SQL Server 2005.

См. также

Справочник

SubscriptionClass Class
SubscriptionClass Members
Microsoft.SqlServer.Management.Nmo Namespace