Contents Index Adding synchronization to your application Running the sample application with synchronization pdf/preface.pdf

UltraLite User's Guide
  Tutorial: Build an Application Using Embedded SQL
    Building the sample embedded SQL UltraLite application
      Adding synchronization to your application

Synchronization via TCP/IP

You can synchronize the remote database with the consolidated database using a TCP/IP socket connection. Call ULSynchronize with the ULSocketStream() stream.

auto ul_synch_info synch_info;
ULInitSynchInfo( &synch_info );
synch_info.user_name = UL_TEXT("50");
synch_info.version = UL_TEXT("custdb");
synch_info.stream = ULSocketStream();
synch_info.stream_parms = 
   UL_TEXT("host=localhost;port=2439");
ULSynchronize( &sqlca, &synch_info );

In order to synchronize with the CustDB consolidated database, the employee ID must be supplied. This ID identifies an instance of an application to the MobiLink server. You may choose a value of 50, 51, 52, or 53. The MobiLink server uses this value to determine the download content, to record the synchronization state, and to recover from interruptions during synchronization.

For more information on the ULSynchronize function, see ULSynchronize function.


Contents Index Adding synchronization to your application Running the sample application with synchronization pdf/preface.pdf