共用方式為


OleDbConnection.InfoMessage 事件

定義

當提供者傳送警告或資訊訊息時發生。

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

事件類型

屬性

備註

想要處理伺服器所傳送警告或參考訊息的客戶端應該建立 OleDbInfoMessageEventHandler 委派來接聽此事件。

InfoMessage 數據源傳回低嚴重性訊息時,就會發生此事件。 低嚴重性訊息是不會造成例外狀況的訊息。 針對 Microsoft SQL Server,這包括嚴重性為 10 或更少的錯誤訊息

如需詳細資訊和範例,請參閱 連接事件

適用於