Windows应用程序需要在线连接到数据库. [英] Windows Applcation need to connect to Database online.

查看:72
本文介绍了Windows应用程序需要在线连接到数据库.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我想做的是在离线" Windows应用程序上创建该应用程序,该应用程序连接并与在线(存储在Internet上的某个数据源)进行对话.

理想情况下,我希望数据库为MS Access,并且我的应用程序可以简单地连接到该数据库,但是我被告知这是行不通的(而且我一直无法使它正常工作).

到目前为止,我的工作一直是在每次启动应用程序时下载文件,然后在用户完成操作后上载文件,但这不是我想要的,因为我希望它可以被多个应用程序使用一个人一次.

有人告诉我,Web服务是必经之路.但是经过数周的试验之后,我什至无法使Visual Studio 2010识别我已经上传到我的免费Web服务器(www.somee.come-是我的免费主机)的.asmx Web服务. br/>
因此,任何帮助/说明都将是很棒的,基本上我可以直接从Windows应用程序直接连接到MS Access数据库(如果数据库存储在Web服务器上),其次,如果我不能这样做,那么下一个最佳选择是什么?

如果最好的选择是Web服务,那么有人可以在Visual Studio 2010中解释如何做到这一点吗?我已经看过/阅读了25多个有关Web服务的教程,即使我的.asmx或.svc文件具有与该教程完全相同的代码,当我尝试添加Web引用时,Visual Studio也无法识别该服务(但是当我通过本地主机运行它时可以正常工作!!).

无论如何希望有人可以提供帮助,

谢谢
David

Hi All,

What I would like to do, is to create on ''offline'' windows application that connects and speaks to a Datasource that is online (stored on the internet somewere).

Ideally i''d like the database to be MS Access, and for my application to simply connect to this, but I''ve been told this does not work (and I have been unable to get this to work).

My work around so far has been do download the file each time the application starts up, then upload it after the user has finished, but this is not what I want, as I would like it to be able to be used by more than one person at once.

I''ve been told that web-services are the way to go. But after weeks and weeks of playing around, I am yet unable to even get Visual Studio 2010 to recognise a .asmx web service that i;ve uploaded to my free web server (www.somee.come - are my free hosts).

So any help/clarifcation would be fantastic, basically can I connect to a MS Access database directly from a windows application (if the database is stored on a web-server), secondly if i cannot do this, then what is the next best option?

If the best option is Web services can someone please explain how to do so in Visual Studio 2010? I;ve watched/read 25+ tutorials on web services, and even when my .asmx or .svc file has exactly the same code as the tutorial the service is not recognised by visual studio when i try to add a web reference (yet it works when i run it via my localhost!!!).

Anyway hopefully someone can help,

Thanks
David

推荐答案

MS Access除了在单个桌面上使用非常简单的单个用户应用程序外,别无选择.

您可能要研究一下 http://msdn.microsoft.com/en-us/sync/default.aspx [^ ]

Microsoft Sync Framework
一个全面的同步平台,支持对应用程序,服务和设备的协作和脱机访问,并支持任何数据类型,任何数据存储,任何传输协议和任何网络拓扑.
MS Access is never a choice other than a very simple single user app on a single desktop.

You may want to look into this, http://msdn.microsoft.com/en-us/sync/default.aspx[^]

Microsoft Sync Framework
A comprehensive synchronization platform that enables collaboration and offline access for applications, services, and devices with support for any data type, any data store, any transfer protocol, and any network topology.


这篇关于Windows应用程序需要在线连接到数据库.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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