Share via


ConnectionManager.ServerMessage Event

The event that occurs when SQL Server returns a warning or informational message on the current connection.

Namespace:  Microsoft.SqlServer.Management.Common
Assembly:  Microsoft.SqlServer.ConnectionInfo (in Microsoft.SqlServer.ConnectionInfo.dll)

Syntax

'Declaration
Public Event ServerMessage As ServerMessageEventHandler
'Usage
Dim instance As ConnectionManager 
Dim handler As ServerMessageEventHandler 

AddHandler instance.ServerMessage, handler
public event ServerMessageEventHandler ServerMessage
public:
 event ServerMessageEventHandler^ ServerMessage {
    void add (ServerMessageEventHandler^ value);
    void remove (ServerMessageEventHandler^ value);
}
member ServerMessage : IEvent<ServerMessageEventHandler,
    ServerMessageEventArgs>
JScript supports the use of events, but not the declaration of new ones.

Remarks

The event is handled by the ServerMessageEventHandler delegate.

See Also

Reference

ConnectionManager Class

Microsoft.SqlServer.Management.Common Namespace