locked
How can I Re-Sync failed upload records? RRS feed

  • Question

  • I am synching between mobile device and SQL 2005

    I have several tables that are upload only. Occasionally some records fail to sync properly and are marked accordingly(I have a custom flag on client synced tables so that I can notify the user if records were sucessfully uploaded)

    However, there does not seem to be a way to tell sync services to grab these failed records and try again on the next sync. I thought simply updating my IsSynced column on the client would trigger it but it does not. I also tried resetting the tables SentAnchor to null but that also did not cause a re-sync.  

    Any ideas?

    Wednesday, November 3, 2010 8:35 PM

All replies

  • Hi,

    If IsSynced Column is part of the record in the sync table, they should be uploaded again. You can verify it by registering ChangeApplying Event and check the Dataset in it. If these rows failed to apply due to conflict in the previous sync, update them again will not solve the problem. You need to set proper conflict resolution in ChangeFailed event. If they failed due to other reasons such as unique constraint, you need to fix the constraint before sync again.

    Thanks,

    Dong


    This posting is provided AS IS with no warranties, and confers no rights.
    Thursday, November 4, 2010 3:06 AM
  • Thanks for the reply but I think I need to clarify my scenario.

    For my upload only tables, ONLY INSERTS are performed. I am simply sending data from client to server then deleting from client. The records on the mobile client are not maintained for any lengh of time.

    So when sending data, occasionally the insert fails (usually because of a db change or something). I mark these guys as IsSynched = false and relay this information to the end user. I want these records to be picked up again and attempted to insert again on following syncs. This way the failure is always relayed to the end user and not lost in limbo somewhere.

    How can I instruct SyncServices to treat these failed records as new records and attempt to insert again?

     

    Tuesday, November 9, 2010 9:25 PM