Remarque
L’accès à cette page nécessite une autorisation. Vous pouvez essayer de vous connecter ou de modifier des répertoires.
L’accès à cette page nécessite une autorisation. Vous pouvez essayer de modifier des répertoires.
Adds an NotificationComputedField to the NotificationComputedFieldCollection.
Espace de noms: Microsoft.SqlServer.Management.Nmo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
Syntaxe
'Déclaration
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
)
Paramètres
- notificationComputedField
The NotificationComputedField to add to the collection.
Notes
If you add fields after deploying the instance, you must Update the instance to apply the changes.
Exemple
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)
Sécurité des threads
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.
Plateformes
Plateformes de développement
Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.
Plateformes cibles
Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.
Voir aussi
Référence
NotificationComputedFieldCollection Class
NotificationComputedFieldCollection Members
Microsoft.SqlServer.Management.Nmo Namespace
Autres ressources
Définition du schéma de notification
ComputedFields Element (ADF)