Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Initializes a new instance of the NotificationField class with the parent NotificationClass and a name.
Namespace: Microsoft.SqlServer.Management.Nmo
Assembly : Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
Syntax
'Declaration
Public Sub New ( _
notificationClass As NotificationClass, _
name As String _
)
public NotificationField (
NotificationClass notificationClass,
string name
)
public:
NotificationField (
NotificationClass^ notificationClass,
String^ name
)
public NotificationField (
NotificationClass notificationClass,
String name
)
public function NotificationField (
notificationClass : NotificationClass,
name : String
)
Parameter
- 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 notification field, you must remove the field and the add the field with the new name.
Hinweise
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 Bezeichner.
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.
You must set the Type property to give the field a data type.
Beispiel
The following examples show how to define a notification field and add it to the collection of notification fields for a notification class:
// Define a LeavingFrom notification field and use it for grouping
// digest messages. Add it to the end of the field collection
NotificationField notificationOrgin =
new NotificationField(flightNotifications, "LeavingFrom");
notificationOrgin.Type = "nvarchar(6)";
notificationOrgin.DigestGrouping = true;
flightNotifications.NotificationFields.Add(notificationOrgin);
' Define a LeavingFrom field and use it for grouping
' digest messages. Add it to the end of the collection.
Dim notificationOrgin As NotificationField = _
New NotificationField(flightNotifications, "LeavingFrom")
notificationOrgin.Type = "nvarchar(6)"
notificationOrgin.DigestGrouping = True
flightNotifications.NotificationFields.Add(notificationOrgin)
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
NotificationField Class
NotificationField Members
Microsoft.SqlServer.Management.Nmo Namespace
Andere Ressourcen
Definieren des Benachrichtigungsschemas
Field Element for Schema/Fields (ADF)