Contents Index ULGetLastDownloadTime function ULGlobalAutoincUsage function pdf/preface.pdf

UltraLite User's Guide
  The Embedded SQL Interface
    Library function reference

ULGetSynchResult function


Prototype 

ul_bool ULGetSynchResult( ul_synch_result  * synch-result );

Description 

Stores the results of the most recent synchronization, so that appropriate action can be taken in the application:

The application must allocate a ul_synch_result object before passing it to ULGetSynchResult. The function fills the ul_synch_result with the result of the last synchronization. These results are stored persistently in the database.

The function is of particular use when synchronizing applications on the Palm Computing Platform using HotSync, as the synchronization takes place outside the application itself. The SQLCODE value set in the call to ULPalmLaunch reflects the ULPalmLaunch operation itself. The synchronization status and results are written to the HotSync log only. To obtain extended synchronization result information, call ULGetSynchResult after a successful ULPalmLaunch.

Parameters 

synch-result    A structure to hold the synchronization result. It is defined in ulglobal.h as follows:.

typedef struct {
an_sql_code      sql_code; 
ul_stream_error   stream_error; 
ul_bool       upload_ok; 
ul_bool       ignored_rows; 
ul_auth_status   auth_status; 
ul_s_long       auth_value; 
SQLDATETIME   timestamp; 
ul_synch_status   status; 
} ul_synch_result, * p_ul_synch_result;

where the individual members have the following meanings:

Returns 

The function returns a Boolean value.

true    Success.

false    Failure.

Examples 

The following code checks for success of the previous synchronization.

ul_synch_result synch_result;
memset( &synch_result, 0, sizeof( ul_synch_result ) );
db_init( &sqlca );
EXEC SQL CONNECT "dba" IDENTIFIED BY "sql";
if( !ULGetSynchResult( &sqlca, &synch_result ) ) {
    prMsg( "ULGetSynchResult failed" );
}
See also 

ULPalmLaunch function


Contents Index ULGetLastDownloadTime function ULGlobalAutoincUsage function pdf/preface.pdf