Home > Archive > SQL Anywhere Mobile > October 2005 > DownloadOnly synchronization problem









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author DownloadOnly synchronization problem
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.



Shuchit

2005-10-28, 3:24 am

"Alex Naumenko" <alexn@esna.com> wrote in news:43611858$3@foru
ms-1-dub:

> 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);


How have you defined this downloadonly publication ?

If you add a where clause to the publication on R2 such as "where 1=2" for T1
then this issue should go away.

Shuchit
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com