FieldTypeMods Element for SubscriptionClass/Schema/Field (ADF)

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

Syntax

<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.

Remarks

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 Updating an Application.

Example

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

<FieldTypeMods>DEFAULT 10</FieldTypeMods>

See Also

Reference

Application Definition File Reference

Other Resources

Defining the Subscription Schema
Updating Instances and Applications

Help and Information

Getting SQL Server 2005 Assistance