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 events

begin_download_rows table event

Processes statements related to a specific table just before fetching a list of rows to be inserted or updated in the specified table in the remote database.


In the following table, the description provides the SQL data type. If you are writing your script in Java or .NET, use the appropriate corresponding data type.

In SQL scripts, you can specify event parameters by name or with a question mark. Using question marks has been deprecated. Use named parameters instead. You cannot mix names and question marks within a script. If you use question marks, the parameters must be in the order shown below and are optional only if no subsequent parameters are specified (for example, you must use parameter 1 if you are going to use parameter 2). If you use named parameters, you can specify any subset of the parameters in any order.

Parameter name for SQL scripts Description Order (deprecated for SQL)
s.last_table_download TIMESTAMP. The last download time for the table. 1
s.remote_id VARCHAR(128). The MobiLink remote ID. You can only reference the remote ID if you are using named parameters. Not applicable
s.username VARCHAR(128). The MobiLink user name. 2
s.table VARCHAR(128). The table name. 3
s.script_version VARCHAR(128). Optional IN parameter to specify that the MobiLink server passes the script version string used for the current synchronization to this parameter. Question marks cannot be used to specify this parameter. Not applicable
Default action



This event is executed immediately before fetching the rows to be inserted or updated in the named table in the remote database.

Note For each download table, the begin_download_deletes, download_delete_cursor, and end_download_deletes events are invoked in sequence. Consider implementing all of the download delete logic for a table in a download_delete_cursor event implemented as a single stored procedure that returns a result set containing all of the rows to be deleted from the remote table. The reduced number of script invocations may result in improved download performance.

You can have one begin_download_rows script for each table in the remote database.