locked
ApplyChangeFailed event is not firing on both Client and Server side RRS feed

  • Question

  • hi,

    I am trying to implement Conflict mechnism in my application, but it is not working.

    My app details:
    -------------------

    MS Sql ce compact 3.5 sp1 (client db)
    MS  SQL Server 2008 (Server db)
    MS Sync services ado.net for devices v1 sp1

    Client application code:

    this

     

    .ConflictResolver.ClientDeleteServerUpdateAction = ResolveAction.FireEvent;

     

    this.ConflictResolver.ClientUpdateServerDeleteAction = ResolveAction.FireEvent;

     

    //If any of the following conflicts or errors occur, the ApplyChangeFailed

     

    //event is raised.

     

    this.ConflictResolver.ClientInsertServerInsertAction = ResolveAction.ServerWins;

     

    this.ConflictResolver.ClientUpdateServerUpdateAction = ResolveAction.FireEvent;

     

    this.ConflictResolver.StoreErrorAction = ResolveAction.FireEvent;

     

    //Log information for the ApplyChangeFailed event and handle any

     

    //ResolveAction.FireEvent cases.

     

    this.ApplyChangeFailed += new EventHandler<ApplyChangeFailedEventArgs>(ClientSyncProvider_ApplyChangeFailed)


    Sync service on the server side is handled by a asp.net web service
    --------------------------------------------------------------------------------------



    _serverSyncProvider =

    new DbServerSyncProvider();

     

     

    // event handler for change failed event

    _serverSyncProvider.ApplyChangeFailed +=

    new EventHandler<ApplyChangeFailedEventArgs>(_serverSyncProvider_ApplyChangeFailed);



    my scenario
    -----------------

    1. First i download date from Server to mobile device
    2. now, i will update a particular record on the server side
    3. Update the same record in the mobile device also.
    4. Do a sync

    since there is a conflict it should fire the ApplyChangeFailed event in in one of the places(Server or client), but it is not.

    Give me your suggestions

    TIA
    Jagadeesh






    Thursday, October 1, 2009 11:17 AM

Answers

  • hi,

    its a bi-directinal one.

    any way my problem got solved. problem is related to column mismatch.


    Thanks
    Jagadeesh
    • Marked as answer by Jagadeesh Babu Saturday, October 10, 2009 7:12 AM
    Saturday, October 10, 2009 7:11 AM

All replies

  • ApplyChangeFailed event is firing on the client side for ClientDeleteServerUpdate conflict.

    but, its not firing on the server side.

    my scenario is  " a record will be updated on the server side and client side after last sync" .

    i want to know which conflict will occur and which side(server or client)?

    Thursday, October 1, 2009 6:44 PM
  • what is you sync direction set to  ?

    thanks
    Yunwen
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Tuesday, October 6, 2009 1:04 AM
    Moderator
  • hi,

    its a bi-directinal one.

    any way my problem got solved. problem is related to column mismatch.


    Thanks
    Jagadeesh
    • Marked as answer by Jagadeesh Babu Saturday, October 10, 2009 7:12 AM
    Saturday, October 10, 2009 7:11 AM