UltraLite Embedded SQL User's Guide
Developing UltraLite Applications for the Palm Computing Platform
If you use HotSync, then you synchronize by calling ULPalmLaunch when your application is launched, and ULPalmExit when your application is closed. Do not use ULSynchronize for HotSync synchronization.
To call HotSync synchronization from your application you must add code for the following steps:
Prepare a ul_synch_info structure.
Call ULPalmExit function, supplying the ul_synch_info structure as an argument.
This function is called when the user switches away from the UltraLite application. You must ensure that all outstanding operations are committed before calling ULPalmExit. The ul_synch_info.stream parameter is ignored, and so does not need to be set.
For example:
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" ); if( !ULPalmExit( &sqlca, &info ) ) { return( false ); }
Call ULPalmLaunch.
For more information, see Launching and closing UltraLite applications, and Synchronization parameters.
A MobiLink 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 synchronization server. For HotSync synchronization, the UltraLite application does not communicate directly with a MobiLink synchronization 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:
Supply the required information in the stream_parms member of ul_synch_info passed to ULPalmExit.
For a list of available values, see Stream parameters reference.
Supply a null value for the stream_parms member. The MobiLink conduit then searches in the ClientParms registry entry on the machine where it is running for information on how to connect to the MobiLink synchronization server.
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.
For more information, see HotSync configuration overview.
For information about configuring HotSync, including a description of how to set up your MobiLink HotSync conduit, see Configuring the MobiLink HotSync conduit.