SubscriptionChronicleCollection.Add Method
Adds a SubscriptionChronicle to the SubscriptionChronicleCollection.
네임스페이스: Microsoft.SqlServer.Management.Nmo
어셈블리: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
구문
‘선언
Public Sub Add ( _
subscriptionChronicle As SubscriptionChronicle _
)
public void Add (
SubscriptionChronicle subscriptionChronicle
)
public:
void Add (
SubscriptionChronicle^ subscriptionChronicle
)
public void Add (
SubscriptionChronicle subscriptionChronicle
)
public function Add (
subscriptionChronicle : SubscriptionChronicle
)
매개 변수
- subscriptionChronicle
The SubscriptionChronicle to add to the collection.
주의
If you add a SubscriptionChronicle after deploying the application, you must Update the instance to apply the changes.
예
The following examples show how to create a subscription chronicle and add it to the collection of subscription chronicles for a subscription class:
// Define a chronicle for the subscription class
SubscriptionChronicle sc1 = new SubscriptionChronicle(
flightSubscriptions, "FlightSubChronicle");
sc1.SqlStatements.Add(
"CREATE TABLE MyAppSchema.FlightSubChronicle " +
" (SubscriptionId bigint, LeavingFrom nvarchar(6), " +
" GoingTo nvarchar(6), Price float);");
sc1.SqlStatements.Add(
"CREATE INDEX FlightSubChronicleIndex " +
" ON MyAppSchema.FlightSubChronicle " +
" ( LeavingFrom, GoingTo );");
flightSubscriptions.SubscriptionChronicles.Add(sc1);
' Define a chronicle for the subscription class
Dim sc1 As SubscriptionChronicle = New SubscriptionChronicle( _
flightSubscriptions, "FlightSubChronicle")
sc1.SqlStatements.Add( _
"CREATE TABLE MyAppSchema.FlightSubChronicle " + _
"(SubscriptionId bigint, LeavingFrom nvarchar(6), " + _
"GoingTo nvarchar(6), Price float);")
sc1.SqlStatements.Add( _
"CREATE INDEX FlightSubChronicleIndex " + _
"ON MyAppSchema.FlightSubChronicle " + _
"( LeavingFrom, GoingTo );")
flightSubscriptions.SubscriptionChronicles.Add(sc1)
스레드 보안
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 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.
참고 항목
참조
SubscriptionChronicleCollection Class
SubscriptionChronicleCollection Members
Microsoft.SqlServer.Management.Nmo Namespace
관련 자료
구독 클래스에 대한 기록 정의
Chronicle Element for SubscriptionClass/Chronicles (ADF)