System.Data.SqlClient.SqlConnection.InfoMessage Event

Occurs when ssNoVersion returns a warning or informational message.

Syntax

public event SqlInfoMessageEventHandler InfoMessage

Remarks

Clients that want to process warnings or informational messages sent by the server should create an System.Data.SqlClient.SqlInfoMessageEventHandler delegate to listen to this event.

The SqlConnection.InfoMessage event occurs when a message with a severity of 10 or less is returned by ssNoVersion. Messages that have a severity between 11 and 20 raise an error and messages that have a severity over 20 causes the connection to close. For more information on ssNoVersion error levels, see "Database Engine Error Severities" in ssNoVersion Books Online.

For more information and an example, see Working with Connection Events.

Requirements

Namespace: System.Data.SqlClient
Assembly: System.Data (in System.Data.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0