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 » Writing Synchronization Scripts

Authentication parameters Next Page

Script versions


Scripts are organized into groups called script versions. By specifying a particular version, MobiLink clients can select which set of synchronization scripts will be used to process the upload and prepare the download.

For information about how to add a script version to the consolidated database, see Adding a script version.

Application of script versions

Script versions allow you to organize your scripts into sets, which are run under different circumstances. This ability provides flexibility and is especially useful in the following circumstances:

Assigning version names

A script version name is a string. You specify this name when you add a script to the consolidated database. For example, if you add your scripts with the ml_add_connection_script and the ml_add_table_script stored procedures, the script version name is the first parameter. Alternatively, if you add your scripts using Sybase Central, you are prompted for the version name.

You cannot use the following names for script versions: ml_sis_1 or ml_qa_1. These names are used internally by MobiLink.

Caution    

It is strongly recommended that your script version names do not start with ml_. Script versions starting with ml_ are reserved for internal use.

The default script version

Whenever a remote site fails to supply a script version, the MobiLink server uses the first version defined in the ml_script_version table. If no script version has been defined, the synchronization fails.

ml_global script version

You can create a script version called ml_global that is used differently from other script versions. If you create a script version called ml_global, you define it once and then the connection scripts associated with are automatically used in all synchronizations. You never explicitly specify ml_global as a script version.

If you define a script in the ml_global script version and then you define a script for the same event in the script version that you specify for the synchronization, the specified script version is used. Scripts in the ml_global script version are only used if they are not defined in the primary script version that is being synchronized.

The ml_global script version can only contain connection-level scripts. It is not required, and may not be useful if you are using only one script version.


Adding a script version