I've got a Local Data Cache in my asp.net 3.5 app. I've noticed that once in a while, especially while developing that my local database will get out of sync with the server. I understand why and I can reproduce it with these steps:
1- Start the app
2- Make a change
3- Sync changes with server
4- Start the app again, thus forcing the app to use a new copy of
the local .SDF file.
The changes I made previously are gone obviously, but when I sync with the server, they are not pulled down. My guess is that somewhere the app isn't detecting that the DB is out of sync.
What I'm wonder is if there is a way to programmatically tell my app to do a full sync with the server. Anyone know?
An answer that I got in the Microsoft Forums may provide a solution to your problem.
If you update the tables in question by setting the primary key to itself, the versions of the records will be incremented and they will be included in the next synchronization. You could use an SQL statement similar to the following to do this.
Note that there are a couple of differences in your scenario.
Without having tested it, I think that this solution should work for you - let us know how you get on!