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).

我正在尝试创建一个windows mobile应用程序,其中包含一个数据库,偶尔可以连接到Internet。连接后,我希望将本地数据库与中央数据库服务器同步。中央服务器是一个MySQL服务器。本地数据库可以是任何东西(可能是SQL Compact)。

What I did so far:

到目前为止我所做的:

  • Installed Microsoft Sync Framework
  • 安装微软同步框架
  • Installed MySQL for ADO.NET
  • 安装MySQL为ADO.NET
  • Created a Smart Device Project
  • 创建了一个智能设备项目
  • Created a WCF Library (from this tutorial)
  • 创建了一个WCF库(来自本教程)
  • Created a connection to the central MySQL database in the Server Explorer
  • 在服务器资源管理器中创建与中央MySQL数据库的连接。
  • Failed to create a Local Database Cache with the MySQL connection
  • 无法使用MySQL连接创建本地数据库缓存

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).

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

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.

提前谢谢你。

1 个解决方案

#1


3

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.

我认为您可能需要为MySQL创建一个自定义同步提供程序。您安装的网络提供程序和实际的同步提供程序是两个不同的东西。

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.

我有一个构建Oracle提供程序的演练的链接,但我似乎把它放错了地方。我记得您需要从ServerSyncProvider中派生您的provider。您可能想要查看Sync Framework的主页,因为它们可能有一些有用的文章和视频。

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.

编辑:这是我要找的,但是有点过时了(我建议你也看看其他项目下的文章)。你也可以看看这个。

更多相关文章

  1. PHP数据库类的封装
  2. python pymysql连接数据库pymysql.err.OperationalError 1044
  3. Log4j2记录日志到数据库(MySQL&MongoDB)
  4. MySQL数据库总结(8)字符集与校对集
  5. 在MySQL数据库中存储无法访问的用户
  6. MySQL是一个非常流行的小型关系型数据库管理系统
  7. 161205、win10安装mysql5.7.16数据库
  8. MySQL SELECT INTO OUTFILE到不同的服务器?
  9. MySQL数据库笔记三:数据查询语言(DQL)与事务控制语言(TCL)

随机推荐

  1. golang如何释放map内存?
  2. 代码详解使用Go基于WebSocket构建视频直
  3. golang如何处理输入?
  4. PHP语法和Go语法有什么差异?对比介绍
  5. golang如何调用函数?
  6. golang是面向对象吗?
  7. 用Go实现字符串的逆序
  8. golang如何实现高并发?
  9. 解决Go升级到1.14后无法Debug
  10. golang如何实现继承?