在Windows Mobile和MySQL之间同步数据库 [英] Sync DB between Windows Mobile and MySQL

查看:238
本文介绍了在Windows Mobile和MySQL之间同步数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图创建一个包含数据库的Windows移动应用程序,并且偶尔可以连接到Internet。连接时,我要将本地数据库与中央数据库服务器同步。中央服务器是MySQL服务器。本地数据库可以是任何东西(可能是SQL Compact)。



到目前为止我做了什么:





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



任何帮助?我觉得我有这个Microsoft同步框架都错了。或者我缺少一些东西。



我也在寻找教程。



提前感谢。

解决方案

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



我有一个链接到构建Oracle提供程序的演练,但我似乎放错了它。从我记得你需要从 ServerSyncProvider 。您可能需要查看同步框架主页可能会有几个帖子和视频,应该证明是有用的。



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




编辑:这是我正在寻找的,但它是一个过时的(我建议你也看看在 Projects )。您也可以查看这一个


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.

解决方案

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.

这篇关于在Windows Mobile和MySQL之间同步数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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