NotificationComputedField Class
Represents a computed field in a notification class schema.
Namespace: Microsoft.SqlServer.Management.Nmo
Assembly : Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
Syntax
'Declaration
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
Hinweise
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
Beispiel
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)
Threadsicherheit
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.
Plattformen
Entwicklungsplattformen
Eine Liste der unterstützten Plattformen finden Sie unterHardware- und Softwareanforderungen für die Installation von SQL Server 2005.
Zielplattforme
Eine Liste der unterstützten Plattformen finden Sie unterHardware- und Softwareanforderungen für die Installation von SQL Server 2005.
Siehe auch
Verweis
NotificationComputedField Members
Microsoft.SqlServer.Management.Nmo Namespace
Andere Ressourcen
Definieren des Benachrichtigungsschemas
ComputedField Element (ADF)