Occurs when the .NET Compact Framework data provider for SQL Server sends a warning or an informational message.
[Visual Basic] Public Event InfoMessage As SqlCeInfoMessageEventHandler [C#] public event SqlCeInfoMessageEventHandler InfoMessage; [C++] public: __event SqlCeInfoMessageEventHandler* InfoMessage;
[JScript] In JScript, you can handle the events defined by a class, but you cannot define your own.
The event handler receives an argument of type SqlCeInfoMessageEventArgs containing data related to this event. The following SqlCeInfoMessageEventArgs 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 complete text of the error sent from the data source. |
Clients that want to process warnings or informational messages sent by the server should create a SqlCeInfoMessageEventHandler delegate to listen to this event.
The InfoMessage event fires when a message with low severity is returned by SQL Server CE. Messages that raise an error cause the connection to close.
For more information and an example, see
.NET Framework Security:
SqlCeConnection Class | SqlCeConnection Members | System.Data.SqlServerCe Namespace