OleDbConnection.InfoMessage OleDbConnection.InfoMessage OleDbConnection.InfoMessage OleDbConnection.InfoMessage Event

定义

在提供程序发送警告或信息性消息时发生。Occurs when the provider sends a warning or an informational message.

public:
 event System::Data::OleDb::OleDbInfoMessageEventHandler ^ InfoMessage;
[System.Data.DataSysDescription("DbConnection_InfoMessage")]
public event System.Data.OleDb.OleDbInfoMessageEventHandler InfoMessage;
member this.InfoMessage : System.Data.OleDb.OleDbInfoMessageEventHandler 
Public Custom Event InfoMessage As OleDbInfoMessageEventHandler 
属性

注解

如果客户端需要处理警告或服务器发送的信息性消息,则应OleDbInfoMessageEventHandler创建一个委托来侦听此事件。Clients that want to process warnings or informational messages sent by the server should create an OleDbInfoMessageEventHandler delegate to listen to this event.

InfoMessage从数据源返回严重性较低的消息时发生此事件。The InfoMessage event occurs when a message with low severity is returned from the data source. 低严重性消息是指不会引发异常的消息。Low severity messages are those that do not cause an exception. 对于 Microsoft SQL Server,这包括严重性为10或更低的错误消息For Microsoft SQL Server, this includes error messages that have a severity of 10 or less

有关详细信息和示例,请参阅连接事件For more information and an example, see Connection Events.

适用于