NotificationFieldCollection.Add Method (NotificationField)
Adds a NotificationField at the end of the NotificationFieldCollection.
네임스페이스: Microsoft.SqlServer.Management.Nmo
어셈블리: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
구문
‘선언
Public Sub Add ( _
notificationField As NotificationField _
)
public void Add (
NotificationField notificationField
)
public:
void Add (
NotificationField^ notificationField
)
public void Add (
NotificationField notificationField
)
public function Add (
notificationField : NotificationField
)
매개 변수
- notificationField
The NotificationField to add to the collection.
주의
If you add fields to a deployed application, updating the instance deletes and re-creates the notification class to which it corresponds. This includes dropping and re-creating the tables and views used by this notification class. All data in the existing Microsoft SQL Server tables is permanently deleted.
Use the Update method to update the instance.
예
The following examples show how to add a notification field to the end of 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.
플랫폼
개발 플랫폼
지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.
대상 플랫폼
지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.
참고 항목
참조
NotificationFieldCollection Class
NotificationFieldCollection Members
Microsoft.SqlServer.Management.Nmo Namespace
Instance.Update Method