user1372430
user1372430

Reputation:

Synchronisation SQL Server Compact 3.5 in C#

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.

Upvotes: 3

Views: 2068

Answers (4)

dnxit
dnxit

Reputation: 7350

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

Upvotes: 0

Quince
Quince

Reputation: 188

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

Upvotes: 5

JuneT
JuneT

Reputation: 7860

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.

Upvotes: 0

Batavia
Batavia

Reputation: 2497

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

Upvotes: 1

Related Questions