Contents Index stream synchronization parameter stream_parms synchronization parameter pdf/preface.pdf

UltraLite User's Guide
  UltraLite Reference
    Synchronization parameters

stream_error synchronization parameter


Function 

Set 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:

C/C++ usage 

For embedded SQL, check for SQLE_COMMUNICATIONS_ERROR as follows:

ul_char  error_buff[ 100 ];
ul_synch_info info;
...
ULInitSynchInfo( &info );
info.stream_error.error_string = error_buff;
info.stream_error.error_string_length = 
                   sizeof( error_buff );
...
ULSynchronize( &sqlca, &info )
if( SQLCODE == SQLE_COMMUNICATIONS_ERROR ){
    printf( error_buff );
...// more error handling here

C++ API usage is 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
Java usage 

This feature is not available for Java applications.


Contents Index stream synchronization parameter stream_parms synchronization parameter pdf/preface.pdf