resolve_conflict table event

In the following table, the description provides the SQL data type. If you are writing your script in Java or .NET, you should
use the appropriate corresponding data type. See SQL-Java data types and SQL-.NET data types.

In SQL scripts, you can specify event parameters by name or with a question mark. Using question marks has been deprecated
and it is recommended that you use named parameters. You cannot mix names and question marks within a script. If you use question
marks, the parameters must be in the order shown below and are optional only if no subsequent parameters are specified (for
example, you must use parameter 1 if you want to use parameter 2). If you use named parameters, you can specify any subset
of the parameters in any order.

Parameter name for SQL scripts

Description

Order (deprecated for SQL)

s.remote_id

VARCHAR(128). The MobiLink remote ID. You can only reference the remote ID if you are using named parameters.

When a row is updated on a remote database, the MobiLink client saves a copy of the original values. The client sends both
old and new values to the MobiLink server.

When the MobiLink server receives an updated row, it compares the original values with the present values in the consolidated
database. The comparison is done using the upload_fetch script.

If the old uploaded values do not match the current values in the consolidated database, the row conflicts. Instead of updating
the row, the MobiLink server inserts both old and new values into the consolidated database. The old and new rows are handled
using the upload_old_row_insert and upload_new_row_insert scripts, respectively.

Once the values have been inserted, the MobiLink server executes the resolve_conflict script. It provides the opportunity
to resolve the conflict. You can implement any scheme of your choosing.

This script is executed once per conflict.

Alternatively, instead of defining the resolve_conflict script, you can resolve conflicts in a set-oriented fashion by putting
conflict-resolution logic either in your end_upload_rows script or in your end_upload table script.

You can have one resolve_conflict script for each table in the remote database.