The MobiLink user identifies a person and is used for authentication. The remote ID uniquely identifies a MobiLink remote database.
In many synchronization scripts, you have the option of identifying the remote database by the remote ID (with the named parameter s.remote_id) or by the MobiLink user name (with s.username). Using the remote ID has some advantages, especially in UltraLite.
When deployments have a one-to-one relationship between a remote database and a MobiLink user, you can ignore the remote ID. In this case MobiLink event scripts can reference the username parameter, which is the MobiLink user name used for authentication.
If a MobiLink user wants to synchronize data in different databases but each remote has the same data, the synchronization scripts can reference the MobiLink user name. But if the MobiLink user wants to synchronize different sets of data in different databases, the synchronization scripts should reference the remote ID.
In UltraLite databases, the same database can also be synchronized by different users, even if the previous upload state is unknown, because the MobiLink server tracks synchronization progress by remote ID. In this case, you can no longer reference the MobiLink user name in download scripts for timestamp-based downloads, because some rows for each of the other users may be missed and never downloaded. To prevent this, you need to implement a mapping table in the consolidated database with one row for each user using the same remote database. You can make sure that all data for all users is being downloaded with a join of the consolidated table and mapping table that is based on the remote ID for the current synchronization.
You can also use different script versions to synchronize different data to different remote databases. See Script versions.
Discuter à propos de cette page dans DocCommentXchange.
|Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0|