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

upload_insert table event

A data script that provides an event that the MobiLink server uses during processing of the upload to handle rows inserted into the remote database.


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. 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. This parameter is optional.

Not applicable
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
r. column-1 Required. The first inserted column value, referenced by column name or column value. 1
... ... ...
r. column-N Required. The last inserted column value, referenced by column name or column value. N
Default action



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

This script must be implemented in SQL. For Java or .NET processing of rows, use direct row handling.

SQL example

This example handles inserts that were made on the Customer table in the remote database. The script inserts the values into a table named Customer in the consolidated database. The final column of the table identifies the Customer as active. The final column does not appear in the remote database.

CALL ml_add_table_script(
 'INSERT INTO Customer( 
   active )
   {ml r.cust_id}, 
   {ml r.rep_id}, 
   1 )' );