Condividi tramite


EventField Constructor ()

Initializes a new instance of the EventField class.

Spazio dei nomi: Microsoft.SqlServer.Management.Nmo
Assembly : Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Sintassi

'Dichiarazione
Public Sub New
public EventField ()
public:
EventField ()
public EventField ()
public function EventField ()

Osservazioni

Testo aggiornato:5 dicembre 2005

Codice di esempio aggiornato:5 dicembre 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.

Esempio

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)

Piattaforme

Piattaforme di sviluppo

Per un elenco delle piattaforme supportate, vedere Requisiti hardware e software per l'Installazione di SQL Server 2005.

Piattaforme di destinazione

Per un elenco delle piattaforme supportate, vedere Requisiti hardware e software per l'Installazione di SQL Server 2005.

Vedere anche

Riferimento

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

Altre risorse

Definizione delle proprietà di una classe di evento principale
Schema Element for EventClass (ADF)