使用 Microsoft Sync Framework 进行 SQL Server 数据转换

发布于 2024-08-13 06:07:14 字数 186 浏览 1 评论 0原文

我们正在分析用于同步客户端和服务器数据库的 Microsoft Sync Framework。场景是这样的:

服务器数据库保存所有项目的主数据,但客户端数据库仅包含特定项目的数据。此外,客户端和服务器数据库的架构也不同。然而,数据很容易转换。

有没有办法使用 Microsoft Sync Framework 来实现这一目标?

We are analyzing Microsoft Sync Framework for syncing the client and server database. The scenario is like this:

Server DB hold master data for all projects but the client DB only contains data to a specific project. Moreover the schema of client and server database is also different. However the data is easily convertible.

Is there any way to achieve this using Microsoft Sync Framework?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

岁月流歌 2024-08-20 06:07:14

只要满足以下条件,它就可以兑换:
1. 客户端上的架构是服务器的子集
2. 客户端没有额外的架构列

您可以通过将 DbSyncAdpater 附加到其 SyncAdapters 集合来使用 DbSyncProviderSyncAdapters 可以处理列映射。对于数据转换,您可能需要使用 ChangesSelected、ApplyingChanges 等事件。

It is convertible as long as:
1. the schema on the client is a subset of the Server
2. There are no extra schema columns on the client side

You can use the DbSyncProvider by attaching a DbSyncAdpater to its SyncAdapters collection. SyncAdapters can take care of column mappings. For data conversion, you may need to use events like ChangesSelected, ApplyingChanges, etc.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文