UserDefinedFunctionEvents UserDefinedFunctionEvents UserDefinedFunctionEvents Class


The UserDefinedFunctionEvents object represents the settings that are required for SQL Server user-defined function event notification.

public ref class UserDefinedFunctionEvents
public class UserDefinedFunctionEvents
Public Class UserDefinedFunctionEvents


Handling SMO Events


The UserDefinedFunctionEvents class is accessed through Events property and cannot be created as a stand-alone object.

Thread Safety

Any public static (Shared in Microsoft Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.


GetEventSelection() GetEventSelection() GetEventSelection()

Returns the currently selected event notifications.

StartEvents() StartEvents() StartEvents()

Starts receiving events.

StopEvents() StopEvents() StopEvents()

Stops receiving events.

SubscribeToEvents(UserDefinedFunctionEventSet) SubscribeToEvents(UserDefinedFunctionEventSet) SubscribeToEvents(UserDefinedFunctionEventSet)

Specifies the user-defined function events to receive.

SubscribeToEvents(UserDefinedFunctionEventSet, ServerEventHandler) SubscribeToEvents(UserDefinedFunctionEventSet, ServerEventHandler) SubscribeToEvents(UserDefinedFunctionEventSet, ServerEventHandler)

Specifies the user-defined function events to receive and the event handler that handles the events.

UnsubscribeAllEvents() UnsubscribeAllEvents() UnsubscribeAllEvents()

Clears all event settings, and removes all event handlers.

UnsubscribeFromEvents(UserDefinedFunctionEventSet) UnsubscribeFromEvents(UserDefinedFunctionEventSet) UnsubscribeFromEvents(UserDefinedFunctionEventSet)

Clears the specified event settings, and removes all event handlers.


ServerEvent ServerEvent ServerEvent

Specifies the event raised when an event occurs in UserDefinedFunction object and the user has subscribed to the events from that object instance.

Applies to