6. března 2012 18:14
I have implemented MS Sync FrameWork for my application and worked just perfect until now, as I changed a bit the structure of the database. Before, everytime a user made a new account, there would be exactly four tables created and that's it. From now on, there are only two static tables and the rest are created dynamically, two for every entry in one of those two.
I changed my code the following way: I am syncing bidirectional the first two static ones, which still work perfectly, then I start a new sync just for the others. I made first a test to see if the table exists and, if not, I create it. There seems to be not problem, as the structure of my LocalDB (Sql Server CE 3.5) tables with the same names change (those three columns are added).
The problem is with the syncing itself: the data from the LocalDB is not inserted in the server, although the sync direction is set to bidirectional. I thought it would be good to change the order of sync - that means, that it should first upload everything to the server, then download new things. This is possible, as I have found Microsoft.Synchronization.SyncDirectionOrder, but I do not know where to use it.
Your help would be greatly appreciated! Thank you!
7. března 2012 1:50Moderátor
which providers are you using? Did you use the Local Database Cache Wizard or did you hand code everything?
I suggest you enable Sync Framework Tracing or subscribe to the ChangesSelected event on the local provider to check if the inserts are actually selected. You can also subscribe to the ApplyChangeFailed event on the remote provider to check if there are problems applying the changes.
- Označen jako odpověď Antonius74 7. března 2012 8:04