Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » UltraLite - C and C++ Programming » Developing Applications Using Embedded SQL » Adding synchronization to your application

Adding initial data to your application Next Page

Handling synchronization communications errors

The following code illustrates how to handle communications errors from embedded SQL applications:

 if( psqlca->sqlcode == SQLE_COMMUNICATIONS_ERROR ) {
     printf( "  Stream error information:\n"
             "    stream_id         = %d\t(ss_stream_id)\n"
             "    stream_context    = %d\t(ss_stream_context)\n"
             "    stream_error_code = %ld\t(ss_error_code)\n"
             "    error_string      = \"%s\"\n"
             "    system_error_code = %ld\n",
     (long)info.stream_error.system_error_code );

SQLE_COMMUNICATIONS_ERROR is the general error code for communications errors. More information about the specific error is supplied to your application in the members of the stream_error synchronization parameter.

To keep UltraLite small, the runtime reports numbers rather than messages.