Reputation: 147
I'm very new to asp.net with database synchronization. Currently I'm implementing a project that required Server (SQL Server 2010) <> C# Client (SQLite) bidirenctional database synchronization using change tracking. I had go through most of the tutorial/example discussed in forums and Stack Overflow:
http://dotnetvisio.blogspot.com/2013/07/microsoft-change-tracking-sql-server.html
Syncing SQL Server 2008 Databases over HTTP using WCF & Sync Framework
http://msdn.microsoft.com/en-us/library/cc305322.aspx
http://technet.microsoft.com/en-us/library/cc280358(v=sql.105).aspx Etc...
However, I couldn't get any idea on how to implement change tracking database synchronization in between:
[SQL Sever Database with Change Tracking enable] <> [WCF Service] <> [WPF Client] <> [SQLite Local Database]
So my question is how to connect and establish the connection for synchronization with local database? A step-by-step tutorial is much appreciated. Thanks.
Upvotes: 4
Views: 3636
Reputation: 7097
Assuming you are using the Sync Framework to sync two databases together directly you don't need to manually implement the change-tracking components in most situations with SQL Server and/or SQL Server Compact. The easiest way to do this is by writing a helper application that handles the scoping and provisioning of the databases for you. This will have the Sync Framework automatically create all of the change-tracking objects (Tables/Functions/StoredProcs) necessary for Sync Framework to work properly. Check out this article form MSDN: Walkthrough: Defining Scope and Provisioning
If you can't use provisioning you have some work ahead of you since you will need to write all of your own providers. It's unfortunately not as easy of a task as you'd expect and there isn't much info out there. Here are a few articles to get you started:
http://www.8bit.rs/blog/2009/05/debugging-sql-express-client-sync-provider/
MS's Response that Change Tracking & The Sync Framework are not Directly Compatible
Sync Framework Metadata Services -- This is the info on what you need to build your own providers
Upvotes: 2