Condividi tramite


FieldTypeMods Element for SubscriptionClass/Schema/Field (ADF)

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

Sintassi

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

Osservazioni

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 Aggiornamento di un'applicazione.

Esempio

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

<FieldTypeMods>DEFAULT 10</FieldTypeMods>

Vedere anche

Riferimento

Application Definition File Reference

Altre risorse

Definizione dello schema di sottoscrizione
Aggiornamento di istanze e applicazioni

Guida in linea e informazioni

Assistenza su SQL Server 2005