I'm usin开发者_高级运维g Ado.Net Data Entity Model to add records to a local Sql Compact database every second. I want to sync it to a database on the server. Can you point me in the right direction please?
do you have to write to both databases? how about setting up a replication between the databases? http://msdn.microsoft.com/en-us/library/ms171850.aspx
The Microsoft Sync Framework was designed for this scenario.
We are using Sync framework in our projects . we have implemented sync in sql server and PG SQL , It works reasonably well for us . In addition we have implemented batching too.
To start with refer this documentation and sample code
http://code.msdn.microsoft.com/sync/Release/ProjectReleases.aspx?ReleaseId=4835
This will show you how to synchronize data between multiple sql server databases. You can also customize the 'increments' stored procedures to take custom parameters and filter data based on these parameters (for instance people the client-user is planning to visit).
I will also suggest that you use a reflector to decompile Sync framework code in case you see wierd errors - sometimes it is not possible to figure out where the error is till you see the exception getting caught in the framework code. Redgate works perfectly for me!
Let me know if you need more help!
精彩评论