用于同步SQL Server CE的n层自定义传输协议< - > SQL Server [英] n-tier, custom transfer protocol for synchronizing SQL Server CE <--> SQL Server

查看:101
本文介绍了用于同步SQL Server CE的n层自定义传输协议< - > SQL Server的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好!

我正在研究在n层设置中使用Sync Framework在客户端和服务器之间同步数据。我想使用自定义传输协议作为数据的传输。我最初对在SQL Server
CE(Windows Mobile)和SQL Server之间实现数据库同步感兴趣。

从我到目前为止所读到的,Sync Framework实现这一点的方法是标准自定义提供程序,应作为代理(代理提供程序)。

I'm looking into using the Sync Framework in a n-tier setup for syncing data between client and server. I would like to use a custom transfer protocol as the transport for the data. I'm primarly intrested in implementing database sync between SQL Server CE (Windows Mobile) and SQL Server.
From what I've read so far the Sync Framework way to implement this is a Standard Custom Provider which should act as a proxy (Proxy Provider).

根据"实现标准自定义提供程序" ( http://msdn.microsoft.com/en-us/library/bb902826.aspx 我需要实现KnowledgeSyncProvider,IChangeDataRetreiver和INotifyingChangeApplierTarget。

然而另一个例子我发现"数据库同步 - SQL Server和SQL Server Compact"。 ( http://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName = sync& ReleaseId = 3422
不使用我所看到的IChangeDataRetreiver和INotifyingChangeApplierTarget。所以我想也许我不需要实现它们?

According to "Implementing a Standard Custom Provider" (http://msdn.microsoft.com/en-us/library/bb902826.aspx) I need to implement KnowledgeSyncProvider, IChangeDataRetreiver and INotifyingChangeApplierTarget.
However another example I've found "Database Sync - SQL Server and SQL Server Compact" (http://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sync&ReleaseId=3422) doesn't use the IChangeDataRetreiver and INotifyingChangeApplierTarget from what I can see. So I'm thinking that maybe I dont need to implement them?

我的主要问题是;如何以最简单的方式在自定义协议上实现同步?

The main question I have is; how do I implement the synchronization over the custom protocol in the easiest way?

我在想这样的事情,但我不确定它会起作用:

客户端

- 实现继承KnowledgeSyncProvider的自定义提供程序。此代理应将数据转发到服务器上的SqlSyncProvider。

服务器

- 实现自定义提供程序继承KnowledgeSyncProvider。此代理应将数据转发到客户端上的SqlCeSyncProvider。

I'm thinking something like this but I'm not sure that it would work:
Client
- Implement a custom provider inheriting KnowledgeSyncProvider. This proxy should forward data to an SqlSyncProvider on the server.
Server
- Implement a custom provider inheriting KnowledgeSyncProvider. This proxy should forward data to an SqlCeSyncProvider on the client.



最好的问候

Thomas


Best regards
Thomas

推荐答案

嗨托马斯,

我想你可能想看看这个:

I think you might want to look at this:

http://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName = sync& ReleaseId = 3423

这是一个使用Sql Server和Sql Ce的n层示例,可以让您对自己需要做的事情有所了解。

It is an n-tier sample using Sql Server and Sql Ce and will give you a good idea about what you need to do.

-Jesse


这篇关于用于同步SQL Server CE的n层自定义传输协议< - > SQL Server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆