ProtocolField Class

Represents a single protocol header field.

Namespace: Microsoft.SqlServer.Management.Nmo
Assembly : Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Syntax

'Declaration
Public NotInheritable Class ProtocolField
    Inherits NamedSmoObject
public sealed class ProtocolField : NamedSmoObject
public ref class ProtocolField sealed : public NamedSmoObject
public final class ProtocolField extends NamedSmoObject
public final class ProtocolField extends NamedSmoObject

Hinweise

Some protocol use protocol headers, such as the To header field for the Simple Mail Transfer Protocol (SMTP) delivery protocol. A ProtocolField object represents one protocol field for a delivery protocol.

A ProtocolField has a name and either a SqlExpression or a FieldReference. The FieldName and SqlExpression combination enables you to use a Transact-SQL expression to define the protocol field value. The FieldName and FieldReference combination enables you to use a value from a notification field as the protocol field value.

Inheritance Hierarchy

System.Object
   Microsoft.SqlServer.Management.Smo.SmoObjectBase
     Microsoft.SqlServer.Management.Smo.SqlSmoObject
       Microsoft.SqlServer.Management.Smo.NamedSmoObject
        Microsoft.SqlServer.Management.Nmo.ProtocolField

Beispiel

The following examples show how to define a protocol field and add it to a protocol definition in a notification class:

ProtocolField smtpProtocolField1 = 
    new ProtocolField(smtpProtocol, "Subject");
smtpProtocolField1.SqlExpression = 
    "'Flight notification: '+CONVERT (NVARCHAR(30), GETDATE())";
smtpProtocol.ProtocolFields.Add(smtpProtocolField1);
Dim smtpProtocolField1 As ProtocolField = _
    New ProtocolField(smtpProtocol, "Subject")
smtpProtocolField1.SqlExpression = _
    "'Flight notification: '+CONVERT (NVARCHAR(30), GETDATE())"
smtpProtocol.ProtocolFields.Add(smtpProtocolField1)

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

ProtocolField Members
Microsoft.SqlServer.Management.Nmo Namespace

Andere Ressourcen

Angeben des Namens und der Felder des Übermittlungsprotokolls
Field Element for Protocol/Fields (ADF)