NotificationComputedFieldCollection.Add Method (NotificationComputedField)
Adds an NotificationComputedField to the NotificationComputedFieldCollection.
Namespace: Microsoft.SqlServer.Management.Nmo
Assembly : Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
Syntax
'Declaration
Public Sub Add ( _
notificationComputedField As NotificationComputedField _
)
public void Add (
NotificationComputedField notificationComputedField
)
public:
void Add (
NotificationComputedField^ notificationComputedField
)
public void Add (
NotificationComputedField notificationComputedField
)
public function Add (
notificationComputedField : NotificationComputedField
)
Parameter
- notificationComputedField
The NotificationComputedField to add to the collection.
Hinweise
If you add fields after deploying the instance, you must Update the instance to apply the changes.
Beispiel
The following example shows how to define a computed field and then add it to the collection of computed fields:
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
NotificationComputedFieldCollection Class
NotificationComputedFieldCollection Members
Microsoft.SqlServer.Management.Nmo Namespace
Andere Ressourcen
Definieren des Benachrichtigungsschemas
ComputedFields Element (ADF)