MobiLink generates and uses a timestamp for timestamp-based downloads as follows:
After an upload is committed and immediately before invoking the prepare_for_download event, the MobiLink server fetches the current time from the consolidated database and saves the value. This TIMESTAMP value represents the start time of the current download; the next synchronization should only download data that changes after this time.
If the consolidated database supports snapshot isolation, then the download timestamp is the minimum of:
the current time
the start of the oldest open transaction
The MobiLink server sends this TIMESTAMP value as part of the download, and the client stores it.
The next time the client synchronizes, it uses the TIMESTAMP value for the last_download_timestamp that it sends with the upload.
The MobiLink server passes the last_download_timestamp that the client just uploaded into your download scripts. Your scripts can then select changes with timestamps that are newer or equal to the last last_download_timestamp to ensure that only new changes are downloaded.
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |