Detecting conflicts with upload_update scripts (deprecated)

To use the upload_update script to detect conflicts, include all columns in the WHERE clause:

UPDATE table-name
SET col1 = {ml r.col1}, col2 = {ml r. col2 } ...
WHERE pk1 = {ml o.pk1} AND pk2 = {ml o.pk2} ...
   AND col1 = {ml o.col1} AND col2 = {ml o.col2} ...

In this statement, col1, col2 and so on are the non-primary key columns, while pk1, pk2 and so on are primary key columns. The values passed to the second set of non-primary key columns (o.) are the pre-image (or old values) of the updated row. The WHERE clause compares old values uploaded from the remote to current values in the consolidated database. If the values do not match, the update is ignored, preserving the values already on the consolidated database.

See upload_update table event.

The upload_update script is used for conflict detection only if no conflict is detected by upload_fetch or upload_fetch_column_conflict.

Caution

The MobiLink server cannot accurately assess how many rows were changed by an upload script. For this reason, conflict detection using the upload_update script is deprecated.

 Scenario 1 (deprecated)
 Scenario 2