Export (0) Print
Expand All

OleDbConnection.InfoMessage Event

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

[Visual Basic]
Public Event InfoMessage As OleDbInfoMessageEventHandler
[C#]
public event OleDbInfoMessageEventHandler InfoMessage;
[C++]
public: __event OleDbInfoMessageEventHandler* InfoMessage;

[JScript] 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

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

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

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

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

OleDbConnection Class | OleDbConnection Members | System.Data.OleDb Namespace

Show:
© 2014 Microsoft