'Declaration Public Event InfoMessage As MySqlInfoMessageEventHandler |
public event MySqlInfoMessageEventHandler InfoMessage |
The event handler receives an argument of type MySqlInfoMessageEventArgs containing data related to this event. The following MySqlInfoMessageEventArgs properties provide information specific to this event.
| Property | Description |
|---|---|
| Code | Gets a code that identifies the type of error. |
| Message | Gets the text describing the error. |
Clients that want to process warnings or informational messages sent by the server should create a MySqlInfoMessageEventHandler delegate to listen to this event.
The event, when fired, provides information about how many warnings were issued during execution of a MySqlCommand. Delegates should issue "SHOW WARNINGS" SQL statement to retrieve extended information, which is warning type, code, and message from server. The statement must be executed using the same MySqlConnection that generated the event.
This feature is available only in MySQL versions 4.1.0 and newer.