Поделиться через


SqlStatement Element for SubscriptionClass/Chronicles/Chronicle/SqlSchema (ADF)

Contains a Transact-SQL statement that defines a subscription chronicle table.

Синтаксис

<SubscriptionClasses>
    <SubscriptionClass>
        ...
        <Chronicles>
            <Chronicle>
                ...
                <SqlSchema>
                    <SqlStatement>

Element Characteristics

Characteristic Description

Data type

string, between 1 and 100,000 characters in length.

Default value

None.

Occurrence

Optional once or more per SqlSchema element.

Updates

Can be added, deleted, and modified when updating the application.

Element Relationships

Relationship Elements

Parent element

SqlSchema Element for SubscriptionClass/Chronicles/Chronicle (ADF)

Child elements

None.

Замечания

When using a chronicle you should include one SqlStatement element that drops or renames the chronicle table if it already exists and one SqlStatement element that creates the chronicle table. If you do not drop or rename an existing chronicle table, you will receive an "object exists" error when you update the application. For an example, see SqlSchema Element for SubscriptionClass/Chronicles/Chronicle (ADF).

If you want to keep your subscription chronicle data when updating your application, you can comment out the CREATE TABLE statement in your application definition file (ADF) after you create the application.

Пример

The following example shows a SqlStatement element that creates the subscription chronicle table StockSubscriptionChron.

<SqlStatement>
CREATE TABLE StockSubscriptionChron
(
SubscriberId bigint,
StockSymbol char(10),
StockPrice money
PRIMARY KEY (SubscriberId)
);
</SqlStatement>

См. также

Справочник

Application Definition File Reference

Другие ресурсы

Определение хроники для класса подписки
Обновление экземпляров и приложений

Справка и поддержка

Получение помощи по SQL Server 2005