EventField Constructor ()

Initializes a new instance of the EventField class.

Пространство имен: Microsoft.SqlServer.Management.Nmo
Сборка: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Синтаксис

'Декларация
Public Sub New
public EventField ()
public:
EventField ()
public EventField ()
public function EventField ()

Замечания

Изменения текста5 декабря 2005 г.

Изменения образцов кода5 декабря 2005 г.

If you use the default constructor, you must immediately set the Name property and then set the Parent property. You can then set other properties.

The TypeModifier property is required when using the default constructor. When using the EventField(EventClass,String) constructor, the default value for this property is an empty string.

Пример

The following examples show how to use this default constructor:

// Create an event field and set required properties.
EventField eventOrgin = new EventField();
eventOrgin.Name = "LeavingFrom";
eventOrgin.Parent = flightEvents;
eventOrgin.Type = "nvarchar(6)";
eventOrgin.TypeModifier = "";
flightEvents.EventFields.Add(eventOrgin);
' Create an event field and set required properties.
Dim eventOrgin As EventField = New EventField()
eventOrgin.Name = "LeavingFrom"
eventOrgin.Parent = flightEvents
eventOrgin.Type = "nvarchar(6)"
eventOrgin.TypeModifier = ""
flightEvents.EventFields.Add(eventOrgin)

Платформы

Платформы разработки

Список поддерживаемых платформ см. в разделе Hardware and Software Requirements for Installing SQL Server 2005.

Целевые платформы

Список поддерживаемых платформ см. в разделе Hardware and Software Requirements for Installing SQL Server 2005.

См. также

Справочник

EventField Class
EventField Members
Microsoft.SqlServer.Management.Nmo Namespace

Другие ресурсы

Определение свойств основного класса событий
Schema Element for EventClass (ADF)