| Alex Naumenko 2005-10-27, 5:29 pm |
| Hello,
I have 3 databases (all ASA 9.0.2.3198). One consolidated (C1) and 2 remote
(R1,R2).
I have one table (T1) that I set to synchronize by the following schenario:
1) changes in T1 should be generated only on R1;
2) then all changes should sync from R1 to consolidated db C1 (I have
UploadOnly publication);
3) then all changes should sync from C1 to remote db R2 (I have DownloadOnly
publication);
Table T1(
ID, - primary key
Counter)
The business rule is: changes in T1 should come from R1 to all other
databases; if something changed on other databases, it should be overidden
with updates from R1.
These are my scripts on consolidated db C1:
CALL ml_add_table_script ( 'default', 'T1', 'upload_insert', '
INSERT
T1(ID,Counter)
VALUES( ?, ? )
');
CALL ml_add_table_script ( 'default', 'T1', 'upload_update', '
UPDATE T1
SET Counter = ?
WHERE ID = ?
');
CALL ml_add_table_script ( 'default', 'T1', 'upload_delete', '
DELETE
FROM T1
WHERE ID = ?
');
CALL ml_add_table_script ( 'default', 'T1', 'download_cursor', '
SELECT
Counter
FROM T1
WHERE ID = ?
');
All changes comes from R1 to C1 no problem (UploadOnly publication), but if
something was changed on R2 in the same records that should be sync from C1
(DownloadOnly publication), Mobilink client generates an error: "The
download contains modifications to a row with operations that must first be
uploaded." and it rolls back. So, my downloads never happen and R2 stays
unsynchronized.
Am I missing something, or my scripts are not complete, or my procedure
won't work at all as I want it.
Thank you,
Alex.
|