locked
Deleted Records in a filtered template are not populated to client RRS feed

  • Question

  • Hi JuneT,

    this is kind of a follow up of the thread "Some records are not downloaded in filtered scope" (http://social.msdn.microsoft.com/Forums/en-US/syncdevdiscussions/thread/4f8de427-6984-409b-9d33-0f2df59334cf )

    As you suggested, I modified the XML-import of my app in this way:

    step 1) If a value in a filter column has changed I delete that record (and all records in other tables related to that record).
    step 2) Then I reinsert that record with the new filter-value.

    If I sync now, the record is not removed from the client.  (base table and _tracking table have the same number of records, shouldn't there be one record more for the deleted record?)

    However if I just perform step #1 and then sync, the delete is populated to the client as expected.  ( _tracking table has one more record as base, reflecting the deleted record)

    I guess that the problem is that the PK of the record (customerNr) does not change and so the newly inserted record is reflected by the same _tracking record as before.

    Could I solve that by adding a GUID PK to the table or is the problem somewhere else?

    Thanks
    Christian
    Tuesday, January 31, 2012 9:32 AM

Answers

  • you're right, if you have the same PK, you'll have one entry in the tracking table... a new pk value would help.
    • Marked as answer by chl-h Tuesday, January 31, 2012 10:13 AM
    Tuesday, January 31, 2012 9:37 AM

All replies

  • you're right, if you have the same PK, you'll have one entry in the tracking table... a new pk value would help.
    • Marked as answer by chl-h Tuesday, January 31, 2012 10:13 AM
    Tuesday, January 31, 2012 9:37 AM
  • HI JuneT,

    ok. 

    So whenever I want to populate deleted records to a client the newly inserted records need to have a different PK as before.

    Is that conclusion right?

    Thanks

    Christian

     

    Tuesday, January 31, 2012 9:46 AM
  • yes.
    Tuesday, January 31, 2012 10:09 AM