Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » UltraLite - .NET Programming » UltraLite .NET 2.0 API Reference » ULConnection class

Synchronize(ULSyncProgressListener) method Next Page

InfoMessage event


Occurs when UltraLite.NET sends a warning or an informational message on this connection.

Syntax

Visual Basic

Public Event InfoMessage As ULInfoMessageEventHandler

C#

public event ULInfoMessageEventHandler InfoMessage ;

Remarks

To process UltraLite.NET warnings or informational messages, you must create a ULInfoMessageEventHandler delegate and attach it to this event.

Example

The following code defines an informational message event handler.

' Visual Basic
Private Sub MyInfoMessageHandler( _
      obj As Object, args As ULInfoMessageEventArgs _
    )
  System.Console.WriteLine( _
      "InfoMesageHandler: " + args.NativeError + ", " _
      + args.Message _
    )
End Sub

// C#
private void MyInfoMessageHandler(
      object obj, ULInfoMessageEventArgs args
    )
{
  System.Console.WriteLine(
      "InfoMesageHandler: " + args.NativeError + ", "
      + args.Message
    );
}

The following code adds the MyInfoMessageHandler to the connection named conn.

' Visual Basic
AddHandler conn.InfoMessage, AddressOf MyInfoMessageHandler

// C#
conn.InfoMessage +=
  new ULInfoMessageEventHandler(MyInfoMessageHandler);
Event data
See also