none
Sync Framework 2.0 & ADO.NET Sync Services - Synchronization Changes Error RRS feed

  • Question

  • Hello,

    I followed this video : http://download.microsoft.com/download/6/7/3/6730f0e7-a649-4656-96ab-150c7501a583/IntroToSyncServicesADODetNet_HighQuality.wmv. 

    One thing that is weird for me and I can't really understand is this scenario:

    - I'm using bidirectional synchronization

    - In my project I synchronize data when project in in debug mode i can see that rows are updated to remote database

    - then i clean solution (database is one more time copied to bin folder)

    - run again

    - and I synchronize data and sync statistics shows that there is no data to synchronize...

    - but I don't have data uploaded to remote server previously in my local store.... 

     

    How to resolve this issue?

     

    I would be really bad if someone install my application on different machine and then he can't synchronize data previously uploaded.

    Any ideas?...

     

    Regards,

    Daniel Skowroński

    Tuesday, June 1, 2010 2:23 PM

Answers

All replies

  • Hey Daniel,

    I'd like to get more info to better understand your scenario. In the step where you clean the solution, what changes (insert/delete/update) did you make to local database and remote database?

    Thanks,


    Ann Tang
    Tuesday, June 1, 2010 6:48 PM
  • Hi Ann,

    1. I add local store db (SQL Compact)to my project in Visual Studio

    2. I make build of the application, in this process local store db is being copied to project \bin\ dir

    3. Now we have 2 databases one in project tree and another in actual folder where applications runs \bin\

    4. I run application, add data to local store in running application context (\bin folder\) and synchronize data

    5. Now we have synchronized data with remote sql server and local db store in \bin\ folder

    6. Now I make "clean solution" in Visual Studio and in this step db store in \bin\ dir will be deleted and replaced with old local db store from project tree

    7. Now when I try to synchronize data it won't synchronize these rows that were uploaded when synchronizing with previous local store form \bin\ dir and this is great issue for me, it should track data changes and download them...

    8. Of course when I change something in remote sgl server this will be downloaded but what about uploaded data from previous local db store?

    How can I resolve this issue? I've created whole synchronization module and now it looks like it won't work when somebody simply reinstall software with old local db store that it contains.

    Regards, Daniel Skowroński

    Tuesday, June 1, 2010 9:34 PM
  • Any ideas?
    Wednesday, June 2, 2010 12:37 PM
  • Hey,

    You can re-set the clientId on the ClientSyncProvider to a new value for sync to get the data synced down to client again.

    Thanks,


    Ann Tang
    Wednesday, June 2, 2010 10:40 PM
  • It was much more like workaround, but I've achieved this by reseting both SyncAnchor and ClientId
    Tuesday, June 22, 2010 8:19 AM