ProtocolField Class
Represents a single protocol header field.
命名空间: Microsoft.SqlServer.Management.Nmo
程序集: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
语法
声明
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
备注
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
示例
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)
线程安全
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.
平台
开发平台
有关支持的平台列表,请参阅安装 SQL Server 2005 的硬件和软件要求。
目标平台
有关支持的平台列表,请参阅安装 SQL Server 2005 的硬件和软件要求。
请参阅
参考
ProtocolField Members
Microsoft.SqlServer.Management.Nmo Namespace