简体   繁体   English

如何将数据从脱机数据库发送和接收到Web服务?

[英]how to send and receieve data from offline database to a web service?

i am working on an android application. 我正在开发一个android应用程序。 I am using xml services to get and retrieve data from my online sql server database. 我正在使用xml服务从在线sql服务器数据库中获取和检索数据。 I have another database which is offline. 我有另一个脱机的数据库。 i want to check a value which will be filled from android device. 我想检查一个将从Android设备填充的值。 the value will be checked from offline database. 该值将从离线数据库中检查。 i made a windows form application which is connected with my offline database. 我做了一个Windows窗体应用程序,它与我的脱机数据库连接。 Now i want to know that by which method i can send data to windows form application from web service and get reply as well as also. 现在,我想知道可以通过哪种方法将数据从Web服务发送到Windows窗体应用程序,并获得答复。 My service is in XML format.. Can anybody help me in this problem?? 我的服务是XML格式。有人可以帮我解决这个问题吗? Thanks in Advance... 提前致谢...

I decided to put as answer so it doesn't become a chat. 我决定作为答案,所以它不会成为聊天。

Yes, most of time the account that IIS run on is high enough to access any files on the computer or at least a dll you might have made that connect to your database. 是的,大多数情况下,运行IIS的帐户足够高,可以访问计算机上的任何文件,或者至少可以访问连接到数据库的dll。

You can easily connect to file c:\\MyOfflineData\\db.mdb (lets say access for sake of example) all you need is the proper ADO connection string. 您可以轻松地连接到文件c:\\MyOfflineData\\db.mdb (为方便起见,请说访问),您需要的只是正确的ADO连接字符串。 It works as well as any other connection. 它与任何其他连接一样工作。

Also BTW you do NOT need to have your SQL server open to the internet. 此外,顺便说一句,您不需要将SQL Server打开到Internet。 For example all my setup have always been like this : 例如,我所有的设置一直都是这样的:

1 server with IIS and all my Web service opened to the internet 1台带有IIS的服务器,我的所有Web服务都已打开并可以上网

1 server with SQL that is only internal and have no internet access. 1台带有SQL的服务器,该服务器仅内部并且无法访问Internet。

my services can connect to the SQL since it's on the network and can do whatever i want but no one from outside can see my SQL server. 我的服务可以连接到SQL,因为它在网络上,并且可以执行我想要的任何操作,但没有人可以看到我的SQL Server。 so technically my whole SQL server is "Offline" as you call. 所以从技术上讲,我所说的整个SQL Server都是“离线”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM