locked
Sync Variables RRS feed

  • Question

  • Hi All,

    For Bidirectional Synchronization,  According to MSDN each and every table(database table)  
     have  6 fields
    1.UpdateTimestamp
    2.InsertTimestamp
    3.DeleteTimestamp
    4.InsertId
    5.UpdateId
    6.DeleteId

    But when we use  "Local Database Cache" it is adding two fields to the  data base table

    1.CreationDate
    2.LastEditDate


    So , Which method i can fallow ?

    which one is best?


    Thanks

    • Moved by Hengzhe Li Friday, April 22, 2011 3:09 AM (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Wednesday, June 3, 2009 6:53 AM

Answers

  • Whether to use 6 fields or 2 fileds depends on your sync scenairo.  In general, it is OK to have 6 even though you may not use them all.  What is in your sync application?

    Thanks.


    Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, June 3, 2009 10:41 PM
    Answerer

All replies

  • Hi,

    Look at the table of the following link. For bidirectional sync, there are just two mandatory columns (besidef of primary key column), modify/insert datetime column and delete column. However if you want to distinguish between insert and update action then you need 3 columns for each action. in the same way, if you use columns "client id" for all insert, modify and delete actions, then the sync action would be performed due to only tracked changes which were not made by originator's action (client id)would be propagated, as msdn library describes  for bidirectional mode:

    4 Required if you do not want to echo changes back to the client that made them. For more information, see "Identifying Which Client Made a Data Change" in this topic.


    So the conclusion is that the first approach is better (in terms of efficiency) that second one.

    Hope it's helpfull,,
    José Miguel Torres
    Wednesday, June 3, 2009 3:32 PM
  • Whether to use 6 fields or 2 fileds depends on your sync scenairo.  In general, it is OK to have 6 even though you may not use them all.  What is in your sync application?

    Thanks.


    Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, June 3, 2009 10:41 PM
    Answerer
  • Thanks For Response.

    My Sync Application is used to to maintain Inventory. In this Application  I am Using

    1.VS2008
    2.sqlserver2005(server side)
    3.Sqlserver CE(In WM)
    4.WCF(communaction)
    5.Sync Service for ADO.NET

    At least more than 10 clients use the application on disconnected mode

    So  i  will prefer to use 6 varibles .

    Thanks to José Miguel Torres and Leo Zhou.
    Thursday, June 4, 2009 6:18 AM