Can someone please help me here. I have a Consolidated database with a table called as_itm which has a deleted and a last_modified column. The same table on the remote database does not contain these 2 columns. Should all the tables in the sync model be identical? My deletions in my app is not working. It works on the Consolidated DB but not on the remote. Can you think of a reason why???
This question is marked "community wiki".
When a row is deleted in the consolidated, the needs to be a record of the deletion so the download_delete_cursor event script can find it. This can be done several different ways. One way is to have a shadow-delete table that records all deletions. Another is to mark rows as deleted in the original table. In this last approach, your application(s) must know to ignore these rows.
The Sybase Central plugin for MobiLink can help configure the handling of consolidated-side deletions.
answered 17 Oct '11, 11:01
I assume the "deleted" and "last_modified" columns were added when you deployed a synchronization model for which you had chosen the default of timestamp-based downloads and the non-default choice of logical deletes.
I suspect you deleted the row on the consolidated, so that row could not be selected when the download_delete_cursor was run.
Since you have chosen logical deletes, instead of deleting the row on the consolidated you need to instead update the row's "deleted" column. Then the download_delete_cursor script will select that row and cause it to be deleted when downloading.
You'd probably be better off using the default choice of having a shadow table track deletes. Otherwise you need to define INSTEAD OF triggers to turn deletes on the consolidated table into updates of the "deleted" column, and change all queries run against the consolidated table to ignore rows where the "deleted" column indicates the row has been logically deleted.
answered 17 Oct '11, 18:16