HotSync synchronization takes place when an UltraLite application is closed. It is initiated by the HotSync.
If you use HotSync, then you synchronize by calling ULSetSynchInfo before closing the application. Do not use ULSynchronize or ULConnection.Synchronize for HotSync synchronization.
To enable HotSync synchronization from your application you must add code for the following steps:
This function is called when the user switches away from the UltraLite application. You must ensure that all outstanding operations are committed before calling db_fini. The ul_synch_info.stream parameter is ignored, and so does not need to be set.
For example:
//C++ API ul_synch_info info; ULInitSynchInfo( &info ); info.stream_parms = UL_TEXT( "stream=tcpip;host=localhost" ); info.user_name = UL_TEXT( "50" ); info.version = UL_TEXT( "custdb" ); ULSetSynchInfo( &sqlca, &info ); if( !db.Close( ) ) { return( false ); } |
See Maintaining state in UltraLite Palm applications and Synchronization parameters for UltraLite.
An UltraLite HotSync conduit is required for HotSync synchronization of UltraLite applications. If there are uncommitted transactions when you close your Palm application, and if you synchronize, the conduit reports that synchronization fails because of uncommitted changes in the database.
The synchronization stream parameters in the ul_synch_info structure control communication with the MobiLink server. For HotSync synchronization, the UltraLite application does not communicate directly with a MobiLink server; it is the HotSync conduit instead.
You can supply synchronization stream parameters to govern the behavior of the MobiLink conduit in one of the following ways:
For a list of available values, see Network protocol options for UltraLite synchronization streams.
The stream and stream parameters in the registry entry are specified in the same format as in the ul_synch_info structure stream_parms field.
See UltraLite synchronization parameters and network protocol options.
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |