9. Understanding .NET Data Provider Connectivity : .NET Data Provider Classes : IngresInfoMessageEventHandler Class
Share this page                  
IngresInfoMessageEventHandler Class
The IngresInfoMessageEventHandler delegate represents the delegate method that handles the InfoMessage event.
IngresInfoMessageEventHandler Class Declaration
The IngresInfoMessageEventHandler class has the following message declaration:
C#: [Serializable]
         public delegate void IngresInfoMessageEventHandler
         (object sender, IngresInfoMessageEventArgs e)
VB.NET: <Serializable>
Public Delegate Sub IngresInfoMessageEventHandler _
(ByVal sender As Object, ByVal e As
IngresInfoMessageEventHandler Class Example
The following is an implementation of the IngresInfoMessageEventHandler class:
static void DoWork(string connstring)
    IngresConnection conn = new IngresConnection(connstring);
    conn.InfoMessage += new
<do additional work>
static void OnInfoMessage(
    Object sender, IngresInfoMessageEventArgs e)
    Console.WriteLine("OnInfoMessage event args: ("+
        "ErrorCode=" + e.Number +
        ", Errors=" + e.Errors +
        ", Message=\"" + e.Message + "\"" +
        ", Source=" + e.Source +")");