在Windows Phone 7上使用MySQL数据库? [英] Using a MySQL database on Windows Phone 7?

查看:74
本文介绍了在Windows Phone 7上使用MySQL数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试编写一个Windows Phone 7应用程序,该应用程序需要连接到远程数据源,在这种情况下,它是Linux服务器上的MySQL数据库.我无法将其移至MSSQL,也无法构建任何基于Windows的解决方案(例如服务器上的WCF Web服务).

I'm attempting to write a Windows Phone 7 application which needs to connect to a remote data source, in this case it's a MySQL database on a Linux server. I'm not able to move this over to MSSQL, nor to build any kind of windows-based solution (like a WCF web service on the server).

我可以通过Windows Phone 7应用程序使用MySQL数据库吗? MySQL程序集似乎无法在电话上运行.如果没有,对我来说,通过电话使用此数据库的最佳解决方案是什么?

Is there a way for me to use my MySQL database from my Windows Phone 7 application? The MySQL assemblies don't seem to work on the phone. If not, what would the best solution for me to use this database from the phone?

推荐答案

您可以构建自己的服务,该服务将向您发送json或xml.可以轻松地使用mono,python,Ruby,php或您熟悉的任何技术来构建它.

You could build your self a service which would send you json or xml. this can easily be built using mono, python, Ruby, php or any technology that you are comfortable with.

您可以以一种轻松的方式构建它,您所要做的就是在HTTP GET中调用url来检索您在服务中处理的数据.

You can build it in a restful manner where all you have to do is call urls in a HTTP GET to retreive data which you handle with the services.

并使用HTTP POST提交对服务的更改.

and use the HTTP POST to submit changes to your service.

然后您可以从WP7中调用此服务并使用数据.

you can then from WP7 make calls to this service and consume the data.

WP7目前不支持套接字.因此,最好的选择是通过HTTP传输有效负载.

WP7 does not support sockets at the moment. So your best bet is transfering your payloads over HTTP.

如前所述,如果您有权访问机器配置.您可以运行在语言和功能方面与.Net不太相近的Mono.

As I mentioned before, if you have access to the machines configuration. You could run Mono which isn't too far off of .Net in terms of language and functionality.

此外,您可以从电话中使用Rx库使这些调用异步进行,并保持应用程序的响应速度.

further more, from the phone you can use the Rx library to make these calls Async and keep your application responsive.

这篇关于在Windows Phone 7上使用MySQL数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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