ProtocolField Constructor (NotificationClassProtocol, String)
Initializes a new instance of the ProtocolField class with a parent NotificationClassProtocol and a field name.
네임스페이스: Microsoft.SqlServer.Management.Nmo
어셈블리: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
구문
‘선언
Public Sub New ( _
notificationClassProtocol As NotificationClassProtocol, _
name As String _
)
public ProtocolField (
NotificationClassProtocol notificationClassProtocol,
string name
)
public:
ProtocolField (
NotificationClassProtocol^ notificationClassProtocol,
String^ name
)
public ProtocolField (
NotificationClassProtocol notificationClassProtocol,
String name
)
public function ProtocolField (
notificationClassProtocol : NotificationClassProtocol,
name : String
)
매개 변수
- notificationClassProtocol
The parent NotificationClassProtocol for the protocol field.
name
A String, between 1 and 128 characters in length, that specifies the name of the protocol field.You cannot change the name. To rename a protocol field, you must remove the field and the add a new field that has the new name.
주의
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 식별자.
예
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)
플랫폼
개발 플랫폼
지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.
대상 플랫폼
지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.
참고 항목
참조
ProtocolField Class
ProtocolField Members
Microsoft.SqlServer.Management.Nmo Namespace
관련 자료
FieldName Element for Protocol/Fields/Field (ADF)
배달 프로토콜 이름 및 필드 지정