FieldTypeMods Element for SubscriptionClass/Schema/Field (ADF)

Specifies optional Microsoft SQL Server field attributes for a subscription field, such as null and default values.

语法

<SubscriptionClasses>
    <SubscriptionClass>
        ...
        <Schema>
            <Field>
                ...
                <FieldTypeMods>

Element Characteristics

Characteristic Description

Data type

string, between 1 and 255 characters in length.

Default value

None.

Occurrence

Optional once per Field element.

Updates

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

Element Relationships

Relationship Elements

Parent element

Field Element for SubscriptionClass/Schema (ADF)

Child elements

None.

备注

The value for FieldTypeMods can be any option specified when defining a column for a database table, such as NOT NULL or DEFAULTconstant_expression. For more information about possible values, see CREATE TABLE (Transact-SQL).

If you update a FieldTypeMods element, updating the application re-creates the subscription class to which it corresponds. Notification Services renames the existing tables for the subscription class by appending Old to the table names. Existing subscription table indexes are left unchanged. If you want to transfer data between the old and new subscription tables, it must be done manually. For more information, see 更新应用程序.

示例

The following example shows how to specify that the subscription class field has a default value of 10.

<FieldTypeMods>DEFAULT 10</FieldTypeMods>

请参阅

参考

Application Definition File Reference

其他资源

定义订阅架构
更新实例和应用程序

帮助和信息

获取 SQL Server 2005 帮助