NotificationComputedField Class

Represents a computed field in a notification class schema.

Espacio de nombres: Microsoft.SqlServer.Management.Nmo
Ensamblado: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Sintaxis

'Declaración
Public NotInheritable Class NotificationComputedField
    Inherits NamedSmoObject
public sealed class NotificationComputedField : NamedSmoObject
public ref class NotificationComputedField sealed : public NamedSmoObject
public final class NotificationComputedField extends NamedSmoObject
public final class NotificationComputedField extends NamedSmoObject

Notas

Computed fields allow you to make use of the calculation facilities of Microsoft SQL Server. Using computed fields can improve the performance of your notification application, can reduce the work that you must do in the content formatter, and enables you to use the rich formatting and conversion capabilities in Transact-SQL.

Computed fields are never stored in the notifications table. Instead, they are computed immediately before the notification data is passed to the content formatter.

If you add or delete a computed field, updating the application deletes and re-creates the notification class to which it corresponds. This includes dropping and re-creating the database tables used by this notification class. Make sure to back up your application database before updating the application.

Inheritance Hierarchy

System.Object
   Microsoft.SqlServer.Management.Smo.SmoObjectBase
     Microsoft.SqlServer.Management.Smo.SqlSmoObject
       Microsoft.SqlServer.Management.Smo.NamedSmoObject
        Microsoft.SqlServer.Management.Nmo.NotificationComputedField

Ejemplo

The following example shows how to define a computed field for a notification class:

NotificationComputedField computedPrice = 
    new NotificationComputedField(flightNotifications, 
    "FormattedPrice");
computedPrice.SqlExpression = "CONVERT(NVARCHAR(10), Price, 1)";
flightNotifications.NotificationComputedFields.Add(computedPrice);
Dim computedPrice As NotificationComputedField = _
    New NotificationComputedField(flightNotifications, _
    "FormattedPrice")
computedPrice.SqlExpression = "CONVERT(NVARCHAR(10), Price, 1)"
flightNotifications.NotificationComputedFields.Add( _
    computedPrice)

Seguridad para subprocesos

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.

Plataformas

Plataformas de desarrollo

Para obtener una lista de las plataformas compatibles, vea Requisitos de hardware y software para instalar SQL Server 2005.

Plataformas de destino

Para obtener una lista de las plataformas compatibles, vea Requisitos de hardware y software para instalar SQL Server 2005.

Vea también

Referencia

NotificationComputedField Members
Microsoft.SqlServer.Management.Nmo Namespace

Otros recursos

Definir el esquema de notificación
ComputedField Element (ADF)