UltraLite Embedded SQL User's Guide
Embedded SQL Library Functions
UL_PALM_LAUNCH_RET ULPalmLaunch(
SQLCA * sqlca,
ul_synch_info * synch_info );
typedef enum {
LAUNCH_SUCCESS_FIRST,
LAUNCH_SUCCESS,
LAUNCH_FAIL
} UL_PALM_LAUNCH_RET;
sqlca A pointer to the SQLCA.
synch_info A synchronization structure. For information on the members of this structure, see Synchronization parameters.
If you are using TCP/IP or HTTP synchronization, supply UL_NULL as synch_info.
This function restores application state for UltraLite applications on the Palm Computing Platform. This function is required by all UltraLite Palm applications.
Your application must call ULEnablePalmDB or ULEnableFileDB before calling ULPalmLaunch.
All UltraLite Palm applications need to use this function to handle the launch code in your application's PilotMain.
This function restores the application state when the application is activated. For applications using HotSync or Scout Sync synchronization, it carries out the additional task of processing the download stream prepared by the MobiLink HotSync conduit or MobiLink Scout conduit.
If you are using TCP/IP or HTTP synchronization, supply a null value for the stream parameter in the ul_synch_info synchronization structure. This information is supplied instead in the call to ULSynchronize.
A member of the UL_PALM_LAUNCH_RET enumeration. The return values have the following meanings:
LAUNCH_SUCCESS_FIRST This value is returned the first time the application is successfully launched and at any subsequent time the internal state of the UltraLite database needs to be re-established. In general, the state of the database needs to be re-established only after severe failures.
In embedded SQL applications you should call db_init immediately after this return code is detected; in C++ API applications, you should open a database object.
LAUNCH_SUCCESS This value is returned when an application is successfully launched, after the Palm user has been using other applications.
LAUNCH_FAIL This value is returned when the launch fails.
A typical embedded SQL example is
ULEnablePalmRecordDB( &sqlca ); switch( ULPalmLaunch( &sqlca, &synch_info ) ){ case LAUNCH_SUCCESS_FIRST: if( !db_init( &sqlca ) ){ // db_init failed: add error handling here break; } // fall through case LAUNCH_SUCCESS: // do work here break; case LAUNCH_FAIL: // error break; }
Launching an UltraLite Palm application