共用方式為


SubscriptionClass.SubscriptionChronicles Property

Gets the SubscriptionChronicleCollection for the SubscriptionClass.

命名空間: Microsoft.SqlServer.Management.Nmo
組件: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

語法

'宣告
Public ReadOnly Property SubscriptionChronicles As SubscriptionChronicleCollection
public SubscriptionChronicleCollection SubscriptionChronicles { get; }
public:
property SubscriptionChronicleCollection^ SubscriptionChronicles {
    SubscriptionChronicleCollection^ get ();
}
/** @property */
public SubscriptionChronicleCollection get_SubscriptionChronicles ()
public function get SubscriptionChronicles () : SubscriptionChronicleCollection

屬性值

The SubscriptionChronicleCollection for the SubscriptionClass.

備註

Subscription chronicles, which are optional, store supplemental subscription data for use by your application.

Define individual subscription chronicles using the SubscriptionChronicle class.

範例

The following examples show how to add a subscription chronicle to 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 的硬體和軟體需求>。

請參閱

參考

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

其他資源

定義訂閱類別的紀事輯
Chronicles Element for SubscriptionClass (ADF)