NotificationField Class

Represents a field in a notification class schema.

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

Синтаксис

'Декларация
Public NotInheritable Class NotificationField
    Inherits NamedSmoObject
public sealed class NotificationField : NamedSmoObject
public ref class NotificationField sealed : public NamedSmoObject
public final class NotificationField extends NamedSmoObject
public final class NotificationField extends NamedSmoObject

Замечания

Notification fields store data that subscribers are interested in or that are otherwise used to generate the final notification.

Defining the custom fields for a notification class requires that you know what data you want to send, and must match the data produced by the subscription rule that generates notifications.

For each notification field, you must define the field name and data type.

If you add or delete a notification field, updating the application deletes and re-creates the notification class to which it corresponds. This includes dropping and re-creating the database tables used by this notification class. Make sure to back up your application database before updating the application.

Inheritance Hierarchy

System.Object
   Microsoft.SqlServer.Management.Smo.SmoObjectBase
     Microsoft.SqlServer.Management.Smo.SqlSmoObject
       Microsoft.SqlServer.Management.Smo.NamedSmoObject
        Microsoft.SqlServer.Management.Nmo.NotificationField

Пример

The following examples show how to define a notification field and add it to the collection of notification fields for a notification class:

// Define a LeavingFrom notification field and use it for grouping 
// digest messages. Add it to the end of the field collection
NotificationField notificationOrgin = 
    new NotificationField(flightNotifications, "LeavingFrom");
notificationOrgin.Type = "nvarchar(6)";
notificationOrgin.DigestGrouping = true;
flightNotifications.NotificationFields.Add(notificationOrgin);
' Define a LeavingFrom field and use it for grouping
' digest messages. Add it to the end of the collection.
Dim notificationOrgin As NotificationField = _
    New NotificationField(flightNotifications, "LeavingFrom")
notificationOrgin.Type = "nvarchar(6)"
notificationOrgin.DigestGrouping = True
flightNotifications.NotificationFields.Add(notificationOrgin)

Синхронизация потоков

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Платформы

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

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

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

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

См. также

Справочник

NotificationField Members
Microsoft.SqlServer.Management.Nmo Namespace
NotificationComputedField Class

Другие ресурсы

Определение схемы уведомления
Field Element for Schema/Fields (ADF)