简体   繁体   English

在C#中同步SQL Server Compact 3.5

[英]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. 在我的项目中,我想将SQL Server Compact 3.5与MSSQL Server 2008同步。我通过了Visual Studio 2010中的所有步骤,如添加新项>>本地数据库缓存>>配置数据同步等。连接已成功完成。 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". 单击更新按钮时,必须启动同步,并且必须将MSSQL Server中的新数据添加到“data.sdf”。 I have no idea about how to do this. 我不知道如何做到这一点。 I am a beginner in C#. 我是C#的初学者。 Could you help me? 你可以帮帮我吗?
Kind regards. 亲切的问候。

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. 它显示了如何使用Sync Framework 2.1数据库提供程序在SQL Server数据库和一个或多个SQL Server Compact数据库之间配置和执行同步。
http://code.msdn.microsoft.com/Database-Sync-SQL-Server-de6c8ff8 http://code.msdn.microsoft.com/Database-Sync-SQL-Server-de6c8ff8

have you looked at the tutorials for the microsoft sync framework? 你看过微软同步框架的教程吗?

http://msdn.microsoft.com/en-us/library/ff928606.aspx 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 或者一般http://msdn.microsoft.com/en-us/library/ff928494.aspx

maybe not quite a beginners guide but it's a place to start 也许不是一个初学者指南,但它是一个开始的地方

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. 请参阅: 演练:扩展本地数据库缓存以支持调用同步的部件的双向同步。

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 您可以尝试使用此实用程序来同步SQL Server和SQL Compact之间的数据,但它目前仅支持SQL 2000和2005

http://www.codeproject.com/Articles/25685/SQL-Server-to-SQL-Server-Compact-Edition-Database http://www.codeproject.com/Articles/25685/SQL-Server-to-SQL-Server-Compact-Edition-Database

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM