ProtocolField Class
Represents a single protocol header field.
Espacio de nombres: Microsoft.SqlServer.Management.Nmo
Ensamblado: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
Sintaxis
'Declaración
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
Notas
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
Ejemplo
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)
Seguridad para subprocesos
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.
Plataformas
Plataformas de desarrollo
Para obtener una lista de las plataformas compatibles, vea Requisitos de hardware y software para instalar SQL Server 2005.
Plataformas de destino
Para obtener una lista de las plataformas compatibles, vea Requisitos de hardware y software para instalar SQL Server 2005.
Vea también
Referencia
ProtocolField Members
Microsoft.SqlServer.Management.Nmo Namespace
Otros recursos
Especificar el nombre y los campos de un protocolo de entrega
Field Element for Protocol/Fields (ADF)