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 NotificationClassProtocol class with a NotificationClass and 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 NotificationClassProtocol (
NotificationClass notificationClass,
string name
)
public:
NotificationClassProtocol (
NotificationClass^ notificationClass,
String^ name
)
public NotificationClassProtocol (
NotificationClass notificationClass,
String name
)
public function NotificationClassProtocol (
notificationClass : NotificationClass,
name : String
)
Parameter
- notificationClass
The NotificationClass for this delivery protocol.
name
A String, between 1 and 64 characters in length, that specifies the name of the delivery protocol.You cannot change the name. To rename a delivery protocol, you must remove the delivery protocol and then add a delivery protocol that has the new name.
Hinweise
Aktualisierter Text:05. Dezember 2005
This constructor sets the following property values:
Property |
Value |
1 |
|
|
|
20 |
|
100 |
|
|
The name parameter must match a the name of an InstanceProtocolDefinition object or must be the name of one of the built-in delivery protocols (Simple Mail Transfer Protocol (SMTP) and File). For more information about built-in protocols, see Standardübermittlungsprotokolle.
Beispiel
The following examples show how to define a File delivery protocol and then add it to a notification class:
// Define a file protocol for notification delivery
NotificationClassProtocol fileProtocol =
new NotificationClassProtocol(flightNotifications, "File");
// Define fields, which map notification fields to protocol fields
ProtocolField fileProtocolField1 =
new ProtocolField(fileProtocol, "LeavingFrom");
fileProtocolField1.FieldReference = "LeavingFrom";
fileProtocol.ProtocolFields.Add(fileProtocolField1);
ProtocolField fileProtocolField3 =
new ProtocolField(fileProtocol, "Price");
fileProtocolField3.FieldReference = "FormattedPrice";
fileProtocol.ProtocolFields.Add(fileProtocolField3, 1);
ProtocolField fileProtocolField2 =
new ProtocolField(fileProtocol, "GoingTo");
fileProtocolField2.FieldReference = "GoingTo";
fileProtocol.ProtocolFields.Add(fileProtocolField2, "Price");
// Add file protocol to notification class
flightNotifications.NotificationClassProtocols.Add(fileProtocol);
' Define a file protocol for notification delivery
Dim fileProtocol As NotificationClassProtocol = _
New NotificationClassProtocol(flightNotifications, "File")
' Define fields, which map notification fields to protocol fields
Dim fileProtocolField1 As ProtocolField = _
New ProtocolField(fileProtocol, "LeavingFrom")
fileProtocolField1.FieldReference = "LeavingFrom"
fileProtocol.ProtocolFields.Add(fileProtocolField1)
Dim fileProtocolField3 As ProtocolField = _
New ProtocolField(fileProtocol, "Price")
fileProtocolField3.FieldReference = "FormattedPrice"
fileProtocol.ProtocolFields.Add(fileProtocolField3, 1)
Dim fileProtocolField2 As ProtocolField = _
New ProtocolField(fileProtocol, "GoingTo")
fileProtocolField2.FieldReference = "GoingTo"
fileProtocol.ProtocolFields.Add(fileProtocolField2, "Price")
' Add file protocol to notification class
flightNotifications.NotificationClassProtocols.Add(fileProtocol)
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
NotificationClassProtocol Class
NotificationClassProtocol Members
Microsoft.SqlServer.Management.Nmo Namespace
Andere Ressourcen
Konfigurieren von Übermittlungsprotokollen
ProtocolName Element (ADF)
Protocol Element (ADF)