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

SQL Anywhere 11.0.1 (日本語) » Mobile Link - サーバ管理 » Mobile Link イベント » 同期イベント

 

begin_connection 接続イベント

Mobile Link サーバが統合データベース・サーバに接続するときに呼び出されます。

パラメータ

なし

デフォルトのアクション

なし

備考

Mobile Link 同期は、同期要求を受け取ると、要求に応じて接続を開きます。アプリケーションが Mobile Link サーバへの接続を形成または再形成すると、Mobile Link サーバはその同期の間、データベース・サーバへの接続を一時的に 1 つ割り付けます。Mobile Link サーバがプールからの接続を使用している場合、このイベントは呼び出されない可能性があります。

注意

このスクリプトは、通常は Java または .NET では使用されません。これは、データベース変数の代わりにこのクラス・インスタンスのメンバ変数を使用し、メンバをコンストラクタで準備するためです。

参照
SQL の例

次の SQL スクリプトは、SQL Anywhere 統合データベースで動作します。これで 2 つの変数が作成されます。1 つは last_download タイムスタンプ、もう 1 つは従業員 ID の変数です。

CALL ml_add_connection_script(
    'custdb',
    'begin_connection',
    'create variable @LastDownload timestamp;
    create variable @EmployeeID integer;')