We have an application that uses Sync Services 1.0 for ADO.NET 2. The client is SQL Server Compact Edition 3.5 SP1 and the server is SQL Server Express 2005.
We download a number of code tables from the server and want to upload a number of user data tables. These will be one way only transfers every day. The basic code works as expected. However I have sun into some isues. We decided to enter some historical data into each users client database here at head office. We did this using the application that will be used remotely. For a brief time we had the upload table scommneted out and were only downloading. When we re-added the upload tables, they would not sync as they were out of date with the daily sync process. No problem, we just touched all the upload records and they were marked as updated and we could upload the data.
Here is were it gets confusing. If we run a sql script against the client db and then upload it works fine. If we run that same update, then move the database to a different folder, the upload no longer works. We are definitely connecting and trying to sync from the correct database. We just moved the db's to a folder to run a script to touch the records in each individual client database then copied them back to their expected application folder. The files that are updated, in place, in the applcation folder can be uploaded by the sync command to the server DB. Those that are edited elsewhere and then copied to the application folder will no longer upload.
Can anyone tell me if sync services is tracking the actual folder name that contains the db file in order to determine if new or edited records exist? I found this article that seems to point to a similar problem and I can see from querying the ‘__sysSyncSubscriptions’ and the ‘__sysSyncArticles’ tables that the clientID and machineID change from one machine to another. I cannot edit them as they are system tables. Can client DB's be moved from one machine to another? What if someones machine crashes and they want to copy a backup database to their new machine? Will machine and client ID's or other factors cause the syncing to quit working?
http://alexduggleby.com/2008/03/03/sync-framework-where-does-the-metadata-come-from-for-sqlceclientsyncprovider-sync-services-for-adonet-20/