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

SQL Anywhere 10.0.1 » MobiLink - Server Administration » Synchronization Techniques » Timestamp-based downloads

Timestamp-based downloads Next Page

Using last download times in scripts


The last download timestamp is provided as a parameter to many MobiLink events. The last download timestamp is the value obtained from the consolidated database during the last successful synchronization immediately prior to the download phase. If the current MobiLink user has never synchronized, or has never synchronized successfully, this value is set to 1900-01-01.

See How download timestamps are generated and used.

If you have multiple publications and have synchronized them at different times, then you can have two different last download timestamps. For this reason, there are two script parameter names for last download timestamps:

When you use question marks instead of named parameters in MobiLink scripts, the correct value is always used.

Caution    

If you are using a SQL Anywhere consolidated database and the column holding last modified information is of type DEFAULT TIMESTAMP, then the column should not be synchronized. If your remote databases require such a column, a different column name should be used. Otherwise, the default timestamp value may be overridden by the uploaded value, and will not contain the time that the row was last modified on the consolidated database.

See also
Example
SELECT cust_id, Customer.name, Customer.rep_id
FROM Customer KEY JOIN SalesRep
WHERE Customer.last_modified >= {ml s.last_table_download}
    AND SalesRep.ml_username = {ml s.username}
    AND Customer.active = 1

How download timestamps are generated and used