Contents Index PalmExit method Reopen method pdf/preface.pdf

UltraLite User's Guide
  C++ API Reference
    ULData class

PalmLaunch method


Prototype 

UL_PALM_LAUNCH_RET PalmLaunch( );

UL_PALM_LAUNCH_RET PalmLaunch( ul_synch_info * synch_info );

UL_PALM_LAUNCH_RET PalmLaunch( SQLCA* ca );

UL_PALM_LAUNCH_RET PalmLaunch( SQLCA* ca ,
ul_synch_info * synch_info );

typedef enum {
LAUNCH_SUCCESS_FIRST,
LAUNCH_SUCCESS,
LAUNCH_FAIL
} UL_PALM_LAUNCH_RET;

Description 

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 synchronization structure called by the ULConnection.Synchronize method.

Parameters 

ca    A pointer to the SQLCA. You do not need to supply this argument unless you are using embedded SQL as well as the C++ API in your application and have used a non-default 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 a null value for the stream parameter.

Returns 

A member of the UL_PALM_LAUNCH_RET enumeration. The return values have the following meanings:

Examples 

A typical C++ API example is

ULData db;
ULEnablePalmRecordDB( & sqlca );
switch( db.PalmLaunch( &synch_info ) ){
case LAUNCH_SUCCESS_FIRST:
   if( !db.Open() ){
      // initialization failed: add error handling here
      break;
   }
   // fall through
case LAUNCH_SUCCESS:
   db.Reopen();
   // do work here
   break;
case LAUNCH_FAIL:
   // error
   break;
}

Contents Index PalmExit method Reopen method pdf/preface.pdf