none
Bidirectional Sync not working properly RRS feed

  • Question

  • I have a table marked as BiDirectional. After adding a new record, the upload piece of bidirectional works because the record is on the server. However, the download piece throws an error because of a PK violation. Basically, sync services is trying to download the record that I just entered.

    I did overide the generated Insert and Update statements to exclude the CreationDate column.

    Its almost like the @sync_new_received_anchor = @@DBTS is not being set properly.

    On the generated insert trigger the CreationDate is set to @@DBTS + 1 so I would think that the creation date would be greater than the @sync_new_received_anchor thus not showing up in the SelectIncrementalInsertsCommand 

    WHERE ([CreationDate] > @sync_last_received_anchor

     

    AND [CreationDate] <= @sync_new_received_anchor)";

    Any ideas?

    Wednesday, June 2, 2010 1:41 PM

Answers

  • What is WHERE part of the current SelectIncrementalInsert cmmand?  You may need to add the AND condition that the creator is not equal to SyncSession.SyncClientId.

    Thanks.


    Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, June 2, 2010 11:04 PM
    Answerer