none
How to force update client rows RRS feed

  • Question

  • Hi,

    Two words about my solution: I have one server and multiple client databases, in the same structure; most of all tables have uniqueidentifier primary keys; a clean instalation means attaching the database and fill some tables with deafult values. For synchronization I'm using the NTier architecture. Now the problem: any server changes on this default data, does'nt reflect in the client table after synchronization (Client: SqlServerProvider, Server: RemoteWCF, Direction: Download). I now the solution it's in ApplyChangeFailed event, but I didn't get the right one.

    Regards

    Thursday, May 23, 2013 2:31 PM

Answers

  • RetryWithForceWrite is what you need to set if you want to overwrite the local copy with the one from the server.
    • Marked as answer by Cosmin_H Monday, May 27, 2013 6:46 AM
    Friday, May 24, 2013 6:40 AM
    Moderator

All replies

  • are you trying to attach a database that has been provisioned already?
    Thursday, May 23, 2013 2:42 PM
    Moderator
  • no, database it's provisioned after installation.
    Thursday, May 23, 2013 2:43 PM
  • did you check applychangefailed on the client provider?

    Thursday, May 23, 2013 2:57 PM
    Moderator
  • client provider it raise ApplyChangeFailed event with LocalUpdateRemoteUpdate conflict
    Thursday, May 23, 2013 3:22 PM
  • and how are you resolving the conflicts?

    also, am assuming the default values you're inserting in the newly attached database already exists on the server database.

    when you provision the newly attached database and then you sync it to download changes, the client doesn't know that the default rows you inserted and the ones from the server are one an the same. so all rows from the server will actually be downloaded and will initially cause conflicts because they already exists on the client (because you inserted default values).

    Friday, May 24, 2013 1:44 AM
    Moderator
  • I tried all combinations actions, from RetryApplyingRow to RetryNextSync except Continue with no effect. 

    Yes, your assumption is correct, the server / client databases are from the same source, and both of them have the same default values. My goal is to find a server win solution.

    Friday, May 24, 2013 6:22 AM
  • RetryWithForceWrite is what you need to set if you want to overwrite the local copy with the one from the server.
    • Marked as answer by Cosmin_H Monday, May 27, 2013 6:46 AM
    Friday, May 24, 2013 6:40 AM
    Moderator
  • what do you mean the client data is changed but the conflict persists?

    the values between the tracking tables in the tables being synched will be different among databases. the tracking tables are not synched among replicas, they're meant to track changes.

    Friday, May 24, 2013 8:06 AM
    Moderator
  • Ok, after I did a server / client database reinstall everything was fine. Thank you for your support.
    Monday, May 27, 2013 6:46 AM