Jaa


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 ()

Remarks

Updated text:5 December 2005

Updated sample code:5 December 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.

Example

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"

Platforms

Development Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

Target Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

See Also

Reference

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

Other Resources

Defining Event Classes
EventClass Element (ADF)