locked
SyncDirection in SyncAdapter vs. in SyncTable RRS feed

  • Question

  • Hello *,

     

    there's a property SyncDirection in SyncTable and in SyncAdapter. What's the purpose of each? For SyncTable I understand, that is "ok, this table will be synced, for example, bidirectional". But the SyncAdapter? I'm not sure what it should control.

     

    Thanks for replies.

    • Moved by Max Wang_1983 Friday, April 22, 2011 9:16 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Monday, December 17, 2007 12:01 AM

Answers

  • That's true.

    The settings on the server define its capability. For example, the server could claim that it is able to synchronize orders table two ways (bidirectional). Not all clients desire that, some client might want to just download changes. In this case, the SyncTable on the client would be marked for DownloadOnly.

     

    Thanks

    Tuesday, December 18, 2007 7:28 PM

All replies

  • I don't see SyncDirection property on SyncAdapter. Do you mean SyncAdapterBuilder?

     

    Thanks

     

    Monday, December 17, 2007 5:06 AM
  •  

    Yeah, sorry. I mean SyncAdapterBuilder.
    Monday, December 17, 2007 8:29 AM
  • Hi,

     

    When you specify the direction, the builder generates the commands that is needed to fulfill this direction. For example, if you specify Snapshot, the builder will generate the insert command only. The rest of the commands on the adapter will be null. Another example, if you specify DownloadOnly, the builder will generate three commands only for enumerating inserts, updates and deletes; you get the idea.

     

    It is also an important factor in deciding how to track your changes in the table and what columns you need to add to your table for that matter. The builder will look for the columns depending on the direction. For snapshot, there is no tracking necessary and the builder won't complain about missing tracking columns and what not.

     

    Thanks

     

    Monday, December 17, 2007 8:05 PM
  • Hi,

    OK, now it's a more clearer for me, I hope. Smile But when setting this property in builder, in fact, defines the sync type, what's the purpose of this property in SyncTable? Does it mean, that I can throttle some table in sync?
    Tuesday, December 18, 2007 7:22 PM
  • That's true.

    The settings on the server define its capability. For example, the server could claim that it is able to synchronize orders table two ways (bidirectional). Not all clients desire that, some client might want to just download changes. In this case, the SyncTable on the client would be marked for DownloadOnly.

     

    Thanks

    Tuesday, December 18, 2007 7:28 PM
  • Thanks (it was superfast reply).
    Tuesday, December 18, 2007 7:31 PM