다음을 통해 공유


NotificationClass.NotificationFields Property

Gets the collection of regular (noncomputed) notification fields for the notification class.

네임스페이스: Microsoft.SqlServer.Management.Nmo
어셈블리: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

구문

‘선언
Public ReadOnly Property NotificationFields As NotificationFieldCollection
public NotificationFieldCollection NotificationFields { get; }
public:
property NotificationFieldCollection^ NotificationFields {
    NotificationFieldCollection^ get ();
}
/** @property */
public NotificationFieldCollection get_NotificationFields ()
public function get NotificationFields () : NotificationFieldCollection

속성 값

A NotificationComputedFieldCollection object that represents the collection of noncomputed fields for the notification class.

주의

Notification fields define notification data storage for a notification class. The subscription rule that generates notifications inserts notification values into these fields.

Each notification class must have at least one NotificationField in a NotificationFieldCollection.

The following examples show how to use the NotificationFieldCollection to add notification fields to 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)

You can add fields at a specific position:

// Define a Price field and add it at position 1 in the collection
NotificationField notificationPrice = 
    new NotificationField(flightNotifications, "Price");
notificationPrice.Type = "float";
flightNotifications.NotificationFields.Add(notificationPrice, 1);
' Define a Price field and add it at position 1 
' in the collection.
Dim notificationPrice As NotificationField = _
    New NotificationField(flightNotifications, "Price")
notificationPrice.Type = "float"
flightNotifications.NotificationFields.Add( _
    notificationPrice, 1)

You also can add fields before a specific notification field:

// Define a GoingTo field and add it before the Price field
NotificationField notificationDestination = 
    new NotificationField(flightNotifications, "GoingTo");
notificationDestination.Type = "nvarchar(6)";
flightNotifications.NotificationFields.Add(
    notificationDestination, "Price");
' Define a GoingTo field and add it before the Price field.
Dim notificationDestination As NotificationField = _
    New NotificationField(flightNotifications, "GoingTo")
notificationDestination.Type = "nvarchar(6)"
flightNotifications.NotificationFields.Add( _
    notificationDestination, "Price")

스레드 보안

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.

플랫폼

개발 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

대상 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

참고 항목

참조

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

관련 자료

알림 클래스 정의
알림 스키마 정의
Fields Element for Schema (ADF)