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

SQL Anywhere 12.0.1 » Ultra Light C/C++ プログラミング » アプリケーション開発 » Embedded SQL を使用した Ultra Light C++ アプリケーション開発 » アプリケーションへの同期の追加

 

同期通信エラー

次のサンプルコードは、Embedded SQL アプリケーションから通信エラーを処理する方法を示しています。

if( psqlca->sqlcode == SQLE_MOBILINK_COMMUNICATIONS_ERROR ) {
     printf( "  Stream error information:\n"
             "    stream_error_code = %ld\t(ss_error_code)\n"
             "    error_string      = \"%s\"\n"
             "    system_error_code = %ld\n",
     (long)info.stream_error.stream_error_code,
     info.stream_error.error_string,
     (long)info.stream_error.system_error_code );
}

SQLE_MOBILINK_COMMUNICATIONS_ERROR は、通信エラーを表す一般的なエラーコードです。

Ultra Light のサイズを小さくするために、ランタイムによるレポートは、メッセージではなく数値で行われます。