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".

asked 17 Oct '11, 09:18

Adiel's gravatar image

Adiel
1335
accept rate: 0%

edited 17 Oct '11, 14:23


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.

permanent link

answered 17 Oct '11, 11:01

RussC_FromSAP's gravatar image

RussC_FromSAP
1.3k11030
accept rate: 18%

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.

permanent link

answered 17 Oct '11, 18:16

Graham%20Hurst's gravatar image

Graham Hurst
2.7k11843
accept rate: 29%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×371

question asked: 17 Oct '11, 09:18

question was seen: 1,617 times

last updated: 17 Oct '11, 18:16