Resolving conflicts with resolve_conflict scripts
When the MobiLink server detects a conflict using an upload_fetch script, the following events take place.
For more information, see resolve_conflict table event.
Example
In the following example, you create scripts for six events and then you create a stored procedure.
- In the begin_synchronization script, you create two temporary tables called contact_new and contact_old. (You could also do
this in the begin_connection script.)
- The upload_fetch script detects the conflict.
- When there is a conflict, the upload_old_row_insert and upload_new_row_insert scripts populate the two temporary tables with
the new and old data uploaded from the remote database.
- The resolve_conflict script calls the stored procedure MLResolveContactConflict to resolve the conflict.
The stored procedure MLResolveContactConflict is as follows: