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

SQL Anywhere 11.0.0 » MobiLink - Client Administration » Introduction to SQL Anywhere Clients for MobiLink » Event hooks for SQL Anywhere clients



This stored procedure can be used to define an ending progress when a scripted upload subscription is synchronized. This procedure is called only when a scripted upload publication is being synchronized.

Rows in #hook_dict table




generating download exclusion list (in)


TRUE if no upload is sent during the synchronization (for example, in a download-only synchronization or when a file-based download is applied). In these cases, the upload scripts are still called and the operations generated are used to identify download operations that change rows that need to be uploaded. When such an operation is found, the download is not applied.

publication_n (in)


The publications being synchronized, where n is an integer. There is one publication_n entry for each publication being uploaded. The numbering of n starts at zero.

start progress as timestamp_n progress as timestamp The starting progress for each publication being synchronized expressed as a timestamp, where n is the same integer used to identify the publication.
start progress as bigint_n progress as bigint The starting progress for each publication being synchronized expressed as a bigint, where n is the same integer used to identify the publication.
script version (n) script version name The MobiLink script version to be used for the synchronization.

MobiLink user (in)

MobiLink user name

The MobiLink user for which you are synchronizing.

end progress is bigint (in|out)


When this row is set to TRUE, the end progress value is assumed to be an unsigned bigint that is represented as a string (for example, '12345').

When this row is set to FALSE, the end progress value is assumed to be a timestamp that is represented as a string (for example, '1900/01/01 12:00:00.000').

The default is FALSE.

end progress (in|out) timestamp

The hook can modify this row to change the "end progress as bigint" and "end progress as timestamp" values passed to the upload scripts. These values define the point in time up to which all operations are included in the upload that is being generated.

The value of this row can be set as either an unsigned bigint or as a timestamp according to the setting of the "progress is bigint" row. The default value for this row is the current timestamp.


For a scripted upload, each time an upload procedure is called it is passed a start progress value and an end progress value. The procedure must return all appropriate operations that occurred during the period defined by those two values. The begin progress value is always the same as the end progress value from the last successful synchronization, unless this is a first synchronization, in which case the begin progress is January 1, 1900, 00:00:00.000. By default, the end progress value is the time when dbmlsync began building the upload.

This hook lets you override the default end progress value. You could define a shorter period for the upload or you could implement a progress tracking scheme based on something other than timestamps (for example, generation numbers).

If "end progress is bigint" is set to true, the end progress must be an integer less than or equal to the number of milliseconds from 1900-01-01 00:00:00 to 9999-12-31 23:59:59:9999, which is 255,611,203,259,999.

See also