Contents Index stream synchronization parameter stream_parms synchronization parameter

UltraLite Static C++ User's Guide
  Synchronization Parameters Reference
    Synchronization parameters

stream_error synchronization parameter


Function 

Sets a structure to hold communications error reporting information.

Default 

The parameter has no default value, and must be explicitly set.

Description 

The stream_error field is a structure of type ul_stream_error.

typedef struct ss_error {
    ss_stream_id         stream_id;
    ss_stream_context    stream_context;
    ss_error_code        stream_error_code;
    asa_uint32           system_error_code;
    rp_char              *error_string;
    asa_uint32           error_string_length;
} ss_error, *p_ss_error;

The structure is defined in sserror.h, in the h subdirectory of your SQL Anywhere directory.

The ul_stream_error fields are as follows:

Usage 

Check for SQLE_COMMUNICATIONS_ERROR as follows:

Connection conn;
auto ul_synch_info info;
...
conn.InitSynchInfo( &info );
info.stream_error.error_string = error_buff;
info.stream_error.error_string_length =
                   sizeof( error_buff );
if( !conn.Synchronize( &synch_info ) ){
    if( SQLCODE == SQLE_COMMUNICATIONS_ERROR ){
        printf( error_buff );
    // more error handline here

Contents Index stream synchronization parameter stream_parms synchronization parameter