asp.net.ph

OleDbConnection.InfoMessage Event

System.Data.OleDb Namespace   OleDbConnection Class


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

[ VB ]
Public Event InfoMessage As OleDbInfoMessageEventHandler

[ C# ]
public event OleDbInfoMessageEventHandler InfoMessage;

[ C++ ]
public: __event OleDbInfoMessageEventHandler* 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 OleDbInfoMessageEventArgs containing data related to this event. The following OleDbInfoMessageEventArgs properties provide information specific to this event.

Property Description
ErrorCode Gets the HRESULT following the ANSI SQL standard for the database.
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 OleDbInfoMessageEventHandler delegate to listen to this event.

See Also

OleDbConnection Members   OleDbInfoMessageEventArgs 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