EventClass Constructor ()

Initializes a new instance of the EventClass class.

Namespace: Microsoft.SqlServer.Management.Nmo
Assembly : Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Syntax

'Declaration
Public Sub New
public EventClass ()
public:
EventClass ()
public EventClass ()
public function EventClass ()

Hinweise

Aktualisierter Text:05. Dezember 2005

Aktualisierter Beispielcode:05. Dezember 2005

If you use the default constructor, you must immediately set the Name property and then set the Parent property. You also must set the FileGroup property.

Beispiel

The following examples show how to use this default constructor. Because the default constructor does not set property defaults, you must specify the filegroup for the event class.

// Create an event class and set required properties.
EventClass flightEvents = new EventClass();
flightEvents.Name = "FlightEvents";
flightEvents.Parent = myApplication;
flightEvents.FileGroup = "PRIMARY";
' Create an event class and set required properties.
Dim flightEvents As EventClass = New EventClass()
flightEvents.Name = "FlightEvents"
flightEvents.Parent = myApplication
flightEvents.FileGroup = "PRIMARY"

Plattformen

Entwicklungsplattformen

Eine Liste der unterstützten Plattformen finden Sie unterHardware- und Softwareanforderungen für die Installation von SQL Server 2005.

Zielplattforme

Eine Liste der unterstützten Plattformen finden Sie unterHardware- und Softwareanforderungen für die Installation von SQL Server 2005.

Siehe auch

Verweis

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

Andere Ressourcen

Definieren von Ereignisklassen
EventClass Element (ADF)