Partilhar via


SqlCeConnection.InfoMessage Event

Occurs when the .NET Compact Framework Data Provider for SQL Server sends a warning or an informational message.

Namespace: System.Data.SqlServerCe
Assembly: System.Data.SqlServerCe (in system.data.sqlserverce.dll)

Syntax

'Declaration
Public Event InfoMessage As SqlCeInfoMessageEventHandler
'Usage
Dim instance As SqlCeConnection
Dim handler As SqlCeInfoMessageEventHandler

AddHandler instance.InfoMessage, handler
public event SqlCeInfoMessageEventHandler InfoMessage
public:
event SqlCeInfoMessageEventHandler^ InfoMessage {
    void add (SqlCeInfoMessageEventHandler^ value);
    void remove (SqlCeInfoMessageEventHandler^ value);
}
/** @event */
public void add_InfoMessage (SqlCeInfoMessageEventHandler value)

/** @event */
public void remove_InfoMessage (SqlCeInfoMessageEventHandler value)
In JScript, you can handle the events defined by a class, but you cannot define your own.
Not applicable.

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 Compact Edition. Messages that raise an error cause the connection to close.

Platforms

Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows XP Professional x64 Edition, Windows XP SP2

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

.NET Compact Framework

Supported in: 2.0, 1.0

See Also

Reference

SqlCeConnection Class
SqlCeConnection Members
System.Data.SqlServerCe Namespace