The timestamp method is the most useful general technique for efficient downloads. This technique involves tracking the last time that each user synchronized and only downloading rows that have changed since then.
MobiLink maintains a timestamp value indicating when each MobiLink user last downloaded data. This value is called the last download time.
See Using last download times in scripts.
At the consolidated database, add a last_modified column that holds the most recent time the row was modified. The column is typically declared as follows:
DBMS | last modified column |
---|---|
Adaptive Server Enterprise | datetime
|
IBM DB2 LUW | timestamp
|
Microsoft SQL Server | datetime
|
MySQL | timestamp
|
Oracle | timestamp
|
SQL Anywhere | timestamp DEFAULT timestamp
|
In scripts for the download_cursor and download_delete_cursor events, compare the first parameter to the value in the timestamp column.
Using last download times in scripts
Dealing with daylight savings time
Discuss this page in DocCommentXchange.
|
Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0 |