9. Understanding .NET Data Provider Connectivity : .NET Data Provider Classes : IngresInfoMessageEventHandler Class : IngresInfoMessageEventHandler Class Example
 
Share this page                  
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
    IngresInfoMessageEventHandler(OnInfoMessage);
<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 +")");
}