SqlCeConnection.InfoMessage Event

Note: This namespace, class, or member is supported only in version 1.1 of the .NET Framework.

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.

Event Data

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.

Remarks

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 Working with Connection Events.

Requirements

.NET Framework Security:

See Also

SqlCeConnection Class | SqlCeConnection Members | System.Data.SqlServerCe Namespace

Syntax based on .NET Framework version 1.1.
Documentation version 1.1.1.

Send comments on this topic.

© Microsoft Corporation. All rights reserved.