Sdílet prostřednictvím


DatabaseEvents.SubscribeToEvents Method (DatabaseEventSet)

Specifies the database events to receive.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Syntax

'Declaration
Public Sub SubscribeToEvents ( _
    events As DatabaseEventSet _
)
'Usage
Dim instance As DatabaseEvents 
Dim events As DatabaseEventSet

instance.SubscribeToEvents(events)
public void SubscribeToEvents(
    DatabaseEventSet events
)
public:
void SubscribeToEvents(
    DatabaseEventSet^ events
)
member SubscribeToEvents : 
        events:DatabaseEventSet -> unit
public function SubscribeToEvents(
    events : DatabaseEventSet
)

Parameters

Remarks

Events are sent to the event handlers that are registered with the ServerEvent event.

Examples

Handling SMO Events

See Also

Reference

DatabaseEvents Class

SubscribeToEvents Overload

Microsoft.SqlServer.Management.Smo Namespace