In my project, I want to sync SQL Server Compact 3.5 with MSSQL Server 2008. I passed all steps in Visual Studio 2010 like adding New Item >> Local Database Cache >> Configure Data Synchronization etc. The connection was completed successfully. But after this stage, I don't know how can i do synchronization.
I have a button named "Check Updates". When click the update button, synchronization must start and new data from the MSSQL Server must be added to "data.sdf". I have no idea about how to do this. I am a beginner in C#. Could you help me?
Kind regards.

- 8,232
- 6
- 41
- 59
4 Answers
Examine this link. It shows how to use the Sync Framework 2.1 database providers to configure and execute synchronization between a SQL Server database and one or more SQL Server Compact databases.
http://code.msdn.microsoft.com/Database-Sync-SQL-Server-de6c8ff8

- 144
- 11
have you looked at the tutorials for the microsoft sync framework?
http://msdn.microsoft.com/en-us/library/ff928606.aspx
that one deals with executing synchronization. or in general http://msdn.microsoft.com/en-us/library/ff928494.aspx
maybe not quite a beginners guide but it's a place to start

- 2,497
- 14
- 16
-
Thanks. I thought it might be easier. But it is quite hard. I am searching if whether there is a simpler way. – Oct 12 '12 at 16:44
-
@user1723204 - the links you posted uses providers that doesnt work with the codes generated by the Local Database Cache project item. – JuneT Oct 15 '12 at 03:30
the Local Database Cache project item would have generated all the code for you and you just have to invoke it.
see: Walkthrough: Extending the Local Database Cache to Support Bidirectional Synchronization for the part that invokes the sync.

- 7,840
- 2
- 15
- 14
you can try this utility already written to sync the data between SQL server and SQL Compact but it currently support only SQL 2000 and 2005
http://www.codeproject.com/Articles/25685/SQL-Server-to-SQL-Server-Compact-Edition-Database

- 7,118
- 2
- 30
- 34