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.
Initializes a new instance of the NotificationComputedField class with the parent NotificationClass and a name.
Espace de noms: Microsoft.SqlServer.Management.Nmo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
Syntaxe
'Déclaration
Public Sub New ( _
notificationClass As NotificationClass, _
name As String _
)
public NotificationComputedField (
NotificationClass notificationClass,
string name
)
public:
NotificationComputedField (
NotificationClass^ notificationClass,
String^ name
)
public NotificationComputedField (
NotificationClass notificationClass,
String name
)
public function NotificationComputedField (
notificationClass : NotificationClass,
name : String
)
Paramètres
- notificationClass
The parent NotificationClass object for the computed field.
name
A String, between 1 and 128 characters in length, that specifies the name of the computed field.You cannot change the name. To rename a computed field, you must remove the field and then add a new field that has the new name.
Notes
Field names can contain letters, numbers, and the special characters _#@ and $. They must also conform to Microsoft SQL Server identifier conventions. For more information about SQL Server identifiers, see Identificateurs.
If you change a field name, updating the application deletes and re-creates the notification class to which it corresponds. This includes dropping and re-creating the SQL Server tables used by this notification class. Any data existing in the original notification class tables is permanently deleted.
This constructor sets the DigestGrouping property to false.
Exemple
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)
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
NotificationComputedField Class
NotificationComputedField Members
Microsoft.SqlServer.Management.Nmo Namespace
Autres ressources
FieldName Element for NotificationClass/Schema/ComputedFields/ComputedField (ADF)
Définition du schéma de notification
ComputedField Element (ADF)