다음을 통해 공유


SubscriptionFieldCollection.Add Method (SubscriptionField, String)

Adds a SubscriptionField before another SubscriptionField in the SubscriptionFieldCollection object.

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

구문

‘선언
Public Sub Add ( _
    subscriptionField As SubscriptionField, _
    insertAtColumnName As String _
)
public void Add (
    SubscriptionField subscriptionField,
    string insertAtColumnName
)
public:
void Add (
    SubscriptionField^ subscriptionField, 
    String^ insertAtColumnName
)
public void Add (
    SubscriptionField subscriptionField, 
    String insertAtColumnName
)
public function Add (
    subscriptionField : SubscriptionField, 
    insertAtColumnName : String
)

매개 변수

  • insertAtColumnName
    A String value that specifies the name of the subscription field before which to insert the new SubscriptionField object.

주의

This method allows you to insert a subscription field at a specific position in the subscription field list. Each subscription field becomes a column in a table. Depending on how you add subscriptions, the order of the columns can be important.

If you add a subscription field, updating the instance re-creates the subscription class to which it corresponds. Notification Services renames the existing subscription tables by appending "Old" to the table name and then creates new tables. Existing subscription table indexes are left unchanged.

Use the Update method to update the instance.

If you want to transfer data between the old and new subscription tables, it must be done manually. For more information, see 응용 프로그램 업데이트.

The following examples show how to define a subscription field and add it before the GoingTo field in the collection of subscription fields:

// Define a LeavingFrom field and add it before the GoingTo field
SubscriptionField subOrgin = 
    new SubscriptionField(flightSubscriptions, "LeavingFrom");
subOrgin.Type = "nvarchar(6)";
flightSubscriptions.SubscriptionFields.Add(subOrgin, "GoingTo");
' Define a LeavingFrom field and add it before the GoingTo field
Dim subOrgin As SubscriptionField = _
    New SubscriptionField(flightSubscriptions, "LeavingFrom")
subOrgin.Type = "nvarchar(6)"
flightSubscriptions.SubscriptionFields.Add(subOrgin, "GoingTo")

스레드 보안

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 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

참고 항목

참조

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

관련 자료

구독 스키마 정의
Field Element for Schema/Fields (ADF)