Synchronization is a key feature of many UltraLite applications. This section describes how to add synchronization to your application.
The synchronization logic that keeps UltraLite applications up to date with the consolidated database is not held in the application itself. Synchronization scripts stored in the consolidated database, together with the MobiLink server and the UltraLite runtime library, control how changes are processed when they are uploaded and determines which changes are to be downloaded.
The specifics of each synchronization are controlled by a set of synchronization parameters. These parameters are gathered into a structure, which is then supplied as an argument in a function call to synchronize. The outline of the method is the same in each development model.
Initialize the structure that holds the synchronization parameters.
Assign the parameter values for your application.
Call the synchronization function, supplying the structure or object as argument.
You must ensure that there are no uncommitted changes when you synchronize.
The ul_synch_info structure is documented in the C/C++ component chapter; however, members of the structures are common to embedded SQL development as well. See ul_synch_info_a struct or ul_synch_info_w2 struct depending whether you are using ASCII or wide characters.
For a general description of synchronization parameters, see Synchronization parameters for UltraLite.
Initializing the synchronization parameters
Setting synchronization parameters
Commit all changes before synchronizing
Adding initial data to your application
Handling synchronization communications errors
Monitoring and canceling synchronization
|Discuss this page in DocCommentXchange.
Send feedback about this page using email.
|Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1|