在 Windows Mobile 和 MySQL 之间同步数据库

发布于 2024-08-12 07:16:10 字数 849 浏览 3 评论 0原文

我正在尝试创建一个包含数据库并且偶尔可以连接到互联网的Windows Mobile应用程序。连接后,我想将本地数据库与中央数据库服务器同步。中央服务器是MySQL服务器。本地数据库可以是任何东西(可能是 SQL Compact)。

到目前为止我所做的:

  • 已安装Microsoft Sync Framework
  • 已安装MySQL for ADO.NET
  • 创建了一个智能设备项目
  • 创建了一个 WCF 库(来自 < a href="http://msdn.microsoft.com/en-us/library/cc488004.aspx" rel="nofollow noreferrer">本教程)
  • 在服务器资源管理器中创建了与中央 MySQL 数据库的连接
  • 无法使用 MySQL 连接创建本地数据库缓存

问题是,当我创建新的本地数据库缓存时,可用连接列表不包括我的 MySQL 连接。此外,当我去创建新连接时,列表中没有 MySQL 驱动程序(与在服务器资源管理器中创建连接时可用的列表相反)。

有什么帮助吗?我觉得我对这个 Microsoft Sync Framework 的理解完全错误。或者我错过了一些东西。

我也在找教程。谷歌并没有真正提供帮助(微软也没有提供任何帮助)。

先感谢您。

I am trying to create a windows mobile application that contains a database and can occasionally be connected to the Internet. When connected, I would like to sync the local database with the central database server. The central server is a MySQL server. The local database can be anything (probably SQL Compact).

What I did so far:

  • Installed Microsoft Sync Framework
  • Installed MySQL for ADO.NET
  • Created a Smart Device Project
  • Created a WCF Library (from this tutorial)
  • Created a connection to the central MySQL database in the Server Explorer
  • Failed to create a Local Database Cache with the MySQL connection

The problem is that when I create a new Local Database Cache, the list of available connections does not include my MySQL connection. Furthermore, when I go to create a new connection, there is no MySQL Driver in the list (as opposed to the list available when creating a connection in the Server Explorer).

Any help? I feel that I got this Microsoft Sync Framework all wrong. Or that I am missing something.

I'm looking for tutorials as well. Google wasn't really helpful (neither was Microsoft for that matter).

Thank you in advance.

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

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

发布评论

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

评论(1

顾挽 2024-08-19 07:16:10

我相信您可能必须为 MySQL 创建一个自定义同步提供程序,您安装的 ADO.NET 提供程序和实际的同步提供程序是两个不同的东西。

我有一个构建 Oracle 提供程序的演练链接,但我似乎放错了地方。据我所知,您需要从 ServerSyncProvider。您可能需要按原样查看Sync Framework 主页可能有一些有用的帖子和视频。

希望它有帮助,如果我设法找到该教程链接,我会更新这篇文章。


编辑:是我一直在寻找的,但它有点过时了(我建议您还查看项目下的一些其他帖子)。您可能还想查看这个

I believe you might have to create a custom sync provider for MySQL, the ADO.NET provider you installed and the actual Sync provider are two different things.

I had a link to a walkthrough for building an Oracle provider, but I seem to have misplaced it. From what I can remember you need to derive your provider from ServerSyncProvider. You might want to check out the Sync Framework home page as they are likely to have a few posts and videos that should prove useful.

Hope it helps, I'll update this post if I manage to find that tutorial link.


Edit: This is the one I was looking for, but it's a little out of date (I suggest you also look at a few of the other posts under Projects). You might also want to look at this one.

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