在 Windows Mobile 和 MySQL 之间同步数据库
我正在尝试创建一个包含数据库并且偶尔可以连接到互联网的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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我相信您可能必须为 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.