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

SQL Anywhere 11.0.1 » UltraLite - C and C++ Programming » Application Development » Developing applications using Embedded SQL » Adding synchronization to your application


Monitoring and canceling synchronization

This section describes how to monitor and cancel synchronization from UltraLite applications.

Monitoring synchronization
  • Specify the name of your callback function in the observer member of the synchronization structure (ul_synch_info).

  • Call the synchronization function or method to start synchronization.

  • UltraLite calls your callback function whenever the synchronization state changes. The following section describes the synchronization state.

The following code shows how this sequence of tasks can be implemented in an embedded SQL application:

ULInitSynchInfo( &info );
info.user_name = m_EmpIDStr;
//The info parameter of ULSynchronize() contains
// a pointer to the observer function = ObserverFunc;
ULSynchronize( &sqlca, &info );

Handling synchronization status information