EventField Constructor (EventClass, String)
Initializes a new instance of the EventField class with an EventClass and a name.
네임스페이스: Microsoft.SqlServer.Management.Nmo
어셈블리: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
구문
‘선언
Public Sub New ( _
eventClass As EventClass, _
name As String _
)
public EventField (
EventClass eventClass,
string name
)
public:
EventField (
EventClass^ eventClass,
String^ name
)
public EventField (
EventClass eventClass,
String name
)
public function EventField (
eventClass : EventClass,
name : String
)
매개 변수
- eventClass
The EventClass for the event field. This parameter sets the Parent property.
name
The String of up to 256 characters that specifies the name of the event field.You cannot change the name. To change the event field name, you must remove the event field and the add an event field that has the new name.
주의
Field names can contain letters, numbers, and the special characters _, #, @, and $. They must conform to Microsoft SQL Server identifier conventions. For more information about SQL Server identifiers, see 식별자.
You cannot name an event field EventBatchID or EventID. Microsoft SQL Server 2005 Notification Services already uses these field names internally.
예
The following examples show how to define an event field using this event field constructor:
// Add an orgin field to the end of the field collection
EventField eventOrgin =
new EventField(flightEvents, "LeavingFrom");
eventOrgin.Type = "nvarchar(6)";
eventOrgin.TypeModifier = "not null";
flightEvents.EventFields.Add(eventOrgin);
' Add an orgin field to the end of the field collection.
Dim eventOrgin As EventField = _
New EventField(flightEvents, "LeavingFrom")
eventOrgin.Type = "nvarchar(6)"
eventOrgin.TypeModifier = "not null"
flightEvents.EventFields.Add(eventOrgin)
플랫폼
개발 플랫폼
지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.
대상 플랫폼
지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.
참고 항목
참조
EventField Class
EventField Members
Microsoft.SqlServer.Management.Nmo Namespace
관련 자료
핵심 이벤트 클래스 속성 정의
FieldName Element for EventClass/Schema/Field (ADF)
Schema Element for EventClass (ADF)