asp.net.ph

SqlConnection.InfoMessage Event

System.Data.SqlClient Namespace   SqlConnection Class


Occurs when the provider sends a warning or an informational message.

[ VB ]
Public Event InfoMessage As SqlInfoMessageEventHandler

[ C# ]
public event SqlInfoMessageEventHandler InfoMessage;

[ C++ ]
public: __event SqlInfoMessageEventHandler* InfoMessage;

In [ JScript ], you can handle the events defined by a class, but you cannot define your own.

Event Data

The event handler receives an argument of type SqlInfoMessageEventArgs containing data related to this event. The following SqlInfoMessageEventArgs properties provide information specific to this event.

Property Description
Errors Gets the collection of warnings sent from the data source.
Message Gets the full text of the error sent from the data source.
Source Gets the name of the object that generated the error.

Remarks

The InfoMessage event fires when a message with low severity is returned from the data source. Low severity messages are those that do not result in an exception. For Microsoft SQL Server, this includes error messages with a severity of 10 or less.

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

See Also

SqlConnection Members   SqlInfoMessageEventArgs Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph