locked
Retrieving WHY an update has failed RRS feed

  • Question

  • Hello, after a synchronization request (VS2008, SQLCE3.5, SQLServer2008), my sync stats show me that one update has failed, but I can not find a way to retrieve the reason the update did fail.l Is there a way to view the actual failed error message?

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

Answers

  • Hi,

    Look at this . All conflicts and errors can be catched on both local sync provider and remote sync provider (through ApplyChangeFailed event). There you'll find further information about the exception.

    Regards,

    José Miguel Torres
    • Marked as answer by MattMJB Wednesday, June 3, 2009 10:57 PM
    Wednesday, June 3, 2009 10:50 PM
  • Do you do upload sync or download sync or both?
    In general, you can subscribe ApplyChangeFailed event on both the DbServerSyncProvider and the SqlCeClientProvider.  In the event handler, you can find the row failed to apply from the event argument - ApplyChangeFailedEventArgs e and get

    e.Conflict.ClientChange
    e.Conflict.ServerChange
    e.Context.DataSet

    which should have the information you would like to see.  Also you can turn on SQL profiler if this is a server side failure.

    Thanks.


    Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by MattMJB Wednesday, June 3, 2009 10:57 PM
    Wednesday, June 3, 2009 10:52 PM
    Answerer

All replies

  • Hi,

    Look at this . All conflicts and errors can be catched on both local sync provider and remote sync provider (through ApplyChangeFailed event). There you'll find further information about the exception.

    Regards,

    José Miguel Torres
    • Marked as answer by MattMJB Wednesday, June 3, 2009 10:57 PM
    Wednesday, June 3, 2009 10:50 PM
  • Do you do upload sync or download sync or both?
    In general, you can subscribe ApplyChangeFailed event on both the DbServerSyncProvider and the SqlCeClientProvider.  In the event handler, you can find the row failed to apply from the event argument - ApplyChangeFailedEventArgs e and get

    e.Conflict.ClientChange
    e.Conflict.ServerChange
    e.Context.DataSet

    which should have the information you would like to see.  Also you can turn on SQL profiler if this is a server side failure.

    Thanks.


    Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by MattMJB Wednesday, June 3, 2009 10:57 PM
    Wednesday, June 3, 2009 10:52 PM
    Answerer
  • Jose and L Zhou. Thank you for the helpful tips. Much appreciated.

    Best regards,
    Matthew

    Wednesday, June 3, 2009 10:56 PM