locked
Should LastSentAnchor change on successive UploadOnly synchronizations? RRS feed

  • Question

  • Hi,

    Synching tables from device .SDF and Sql Server 2008 Express, using sql change tracking.

    Transactions are added on the device, then synched with host using UploadOnly sync direction.

    The transactions are added ok at the host, but the LastSentAnchor never changes

      <SyncTableMetadata>
       <TableName>TransactionDiscount</TableName>
       <SyncDirection>UploadOnly</SyncDirection>
       <LastSentAnchor>
        <Anchor>NxoAAAAAAAA=</Anchor>
       </LastSentAnchor>
       <LastReceivedAnchor></LastReceivedAnchor>
      </SyncTableMetadata>

    On the next synchronization, not only are new transactions sent up for synchronization, but all previously synched transactions are as well, leading to ClientInsertServerInsert conflicts.

    The sql Server 2008 Express database is set for Change Tracking enabled, as are the transaction tables affected by this.

    Thanks for any help
    • Moved by Hengzhe Li Friday, April 22, 2011 3:28 AM (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Wednesday, April 1, 2009 4:04 PM

Answers

  • Well, I found a solution thanks to a response in someone's thread regarding deleting rows on the client.

    Calling the AcceptChanges method of the SqlCeClientSyncProvider on the Client SyncAgent updates the tracking metadata on the passed client tables, which keeps them from trying to sync existing data (either deleted or retained rows) on the next synchronization.

    • Marked as answer by cbp Wednesday, April 8, 2009 3:17 PM
    Wednesday, April 8, 2009 3:16 PM