locked
Sync update delete on server data RRS feed

  • Question

  • Hi All,
       When I was going thru the sync help topics, I came across this logic in the stored procedures that applied data [insert, update, delete] on the server. I was not sure about some part of this and hence this question

    Code Snippet

    (@sync_force_write = 1 " + "OR (UpdateTimestamp <= @sync_last_received_anchor " + "OR UpdateId = @sync_client_id))


    I was wondering about the last part of this logic where it says

    Code Snippet

    OR UpdateId = @sync_client_id


    Is this required? Wont the first check

    Code Snippet

    UpdateTimestamp <= @sync_last_received_anchor


    alone work? 

    My understanding of the logic is

    If its not a force_write, we will update the data only if its not been changed since the last time we did a sync

    Please update me if my understanding is wrong. I have been thinking about it and was not able to figure out the need for the last check.

    Thanks
    Raj

    • Moved by Hengzhe Li Friday, April 22, 2011 6:32 AM (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Tuesday, December 23, 2008 7:35 PM

Answers

  • this condition for the update command is to ensure no conflict was raised if the row was immediately updated by the same client either in the same sync ( same table to be in different sync group ) or in different syncs ( e.g. uploadonly case ).

     

    thanks

    Yunwen

    Monday, January 12, 2009 10:34 PM
    Moderator

All replies

  • this condition for the update command is to ensure no conflict was raised if the row was immediately updated by the same client either in the same sync ( same table to be in different sync group ) or in different syncs ( e.g. uploadonly case ).

     

    thanks

    Yunwen

    Monday, January 12, 2009 10:34 PM
    Moderator
  • Thanks for the reply Yunwen,
    That answered my doubt.

    Raj
    Saturday, January 17, 2009 6:21 AM