locked
How to specify synchronization order so that donwload takes places first and then the upload? RRS feed

  • Question

  • Is there a way to specify the order in which the upload/download takes place for the bidirectional synchronization? I want to be able to download to the client the changes from the server first and the upload the changes from the client to the server. By default it is uploading first and then uploading.
    • Moved by Hengzhe Li Friday, April 22, 2011 3:11 AM (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Thursday, May 28, 2009 5:27 AM

Answers

  • Currently in the Hub and Spoke providers (DbServerSyncProvider and SqlCeClientSyncProvider), the order of operations for bi-directional syncs is always Upload followed by Download.  In the Peer-to-Peer provider (DbSyncProvider), syncs can be done in any order.  I'm assuming you are using the Hub and Spoke providers, so currently this is unsupported.  Out of curiousity, what is the reason for wanting to do download first?

    Thanks,
    Phil
    • Proposed as answer by Phil Piwonka Thursday, May 28, 2009 7:39 PM
    • Marked as answer by Ana Bell Thursday, May 28, 2009 8:12 PM
    Thursday, May 28, 2009 7:38 PM

All replies

  • Currently in the Hub and Spoke providers (DbServerSyncProvider and SqlCeClientSyncProvider), the order of operations for bi-directional syncs is always Upload followed by Download.  In the Peer-to-Peer provider (DbSyncProvider), syncs can be done in any order.  I'm assuming you are using the Hub and Spoke providers, so currently this is unsupported.  Out of curiousity, what is the reason for wanting to do download first?

    Thanks,
    Phil
    • Proposed as answer by Phil Piwonka Thursday, May 28, 2009 7:39 PM
    • Marked as answer by Ana Bell Thursday, May 28, 2009 8:12 PM
    Thursday, May 28, 2009 7:38 PM
  • Thanks for you response Phil!

    The issue I'm trying to solve is handling the conflicts generated in the server (since I'm working on an N tier arch using WCF). I thought if I could dowload first, then I would resolve the conflicts in the client, ask the user to take action and by the time the upload takes place, then the conflicts would already be solved.

    Since this is not possible, then I will have to go with the solution you proposed in the other thread, catching the conflict on the server side and saving the conflicted rows.

    I think I will le the server win, and at the end of the sync notify the user and make the changes in case he wants to let the client win.
    Thursday, May 28, 2009 8:12 PM