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

SQL Anywhere 17 » MobiLink - Server Administration » MobiLink events » Synchronization scripts

Scripts and the synchronization process

Each script corresponds to a particular event in the synchronization process. You write a script only when some action must occur. All unnecessary events can be left undefined.

The two principal parts of the process are the processing of uploaded information and the preparation of rows for downloading. If rows are uploaded from a remote table you must define the appropriate upload script(s). If a table is to have rows downloaded via SQL then both the download_cursor and download_delete_cursor scripts must be defined.

The MobiLink server reads and prepares each script once, when it is first needed. The script is then executed whenever the event is invoked.

The sequence of events

An overview of MobiLink events is provided in the documentation for synchronization events.

  • MobiLink technology allows multiple clients to synchronize concurrently. In this case, each client uses a separate connection to the consolidated database.

  • The begin_connection and end_connection events are independent of any one synchronization as one connection can handle many synchronization requests. These scripts have no parameters. These are examples of connection-level scripts.

  • Some events are invoked only once for each synchronization regardless of how many tables are synchronized. These are connection-level scripts.

  • Some events are invoked once for each table being synchronized. Scripts associated with these events are called table-level scripts.

    While each table can have its own table scripts, you can also write table-level scripts that are shared by several tables, though this is uncommon.

  • Some events, such as begin_synchronization, occur at both the connection level and the table level. You can supply both connection and table scripts for these events.

Reference material, including details about each script and its parameters, can be found in the documentation for synchronization events.