ViewEvents.SubscribeToEvents ViewEvents.SubscribeToEvents ViewEvents.SubscribeToEvents Method

Definition

Specifies the view events to receive.

Overloads

SubscribeToEvents(ViewEventSet) SubscribeToEvents(ViewEventSet) SubscribeToEvents(ViewEventSet)

Specifies the view events to receive.

SubscribeToEvents(ViewEventSet, ServerEventHandler) SubscribeToEvents(ViewEventSet, ServerEventHandler) SubscribeToEvents(ViewEventSet, ServerEventHandler)

Specifies the view events to receive and the event handler that handles the events.

SubscribeToEvents(ViewEventSet) SubscribeToEvents(ViewEventSet) SubscribeToEvents(ViewEventSet)

Specifies the view events to receive.

public:
 void SubscribeToEvents(Microsoft::SqlServer::Management::Smo::ViewEventSet ^ events);
public void SubscribeToEvents (Microsoft.SqlServer.Management.Smo.ViewEventSet events);
Public Sub SubscribeToEvents (events As ViewEventSet)
Parameters
events
ViewEventSet ViewEventSet ViewEventSet

A ViewEventSet object that specifies the set of events to receive.

Examples

Handling SMO Events

Remarks

Events are sent to the event handlers that are registered with the OnEvent statement.

SubscribeToEvents(ViewEventSet, ServerEventHandler) SubscribeToEvents(ViewEventSet, ServerEventHandler) SubscribeToEvents(ViewEventSet, ServerEventHandler)

Specifies the view events to receive and the event handler that handles the events.

public:
 void SubscribeToEvents(Microsoft::SqlServer::Management::Smo::ViewEventSet ^ events, Microsoft::SqlServer::Management::Smo::ServerEventHandler ^ eventHandler);
public void SubscribeToEvents (Microsoft.SqlServer.Management.Smo.ViewEventSet events, Microsoft.SqlServer.Management.Smo.ServerEventHandler eventHandler);
Public Sub SubscribeToEvents (events As ViewEventSet, eventHandler As ServerEventHandler)
Parameters
events
ViewEventSet ViewEventSet ViewEventSet

A ViewEventSet object that specifies the set of events to receive.

eventHandler
ServerEventHandler ServerEventHandler ServerEventHandler

A ServerEventHandler object that handles the events that are received.

Examples

Handling SMO Events

Applies to