Windows 8 HTML5/Javascript 桌面开发中的 SQL 数据访问
尊敬的开发界圣贤们大家好,
我谦卑地向您提出一个菜鸟问题。事实上,我对 Windows 8 Metro HTML5/Javascript 开发感到非常兴奋,但我还没有深入研究它。谷歌到目前为止让我失望的第一个问题是如何使用 Metro HTML 应用程序进行本地数据访问?我知道我可以使用一些新的 HTML5 本地存储功能,但是如果我希望有一个应用程序能够写入/接收数据以表示本地计算机上的 SQL CE 数据库而不是远程数据库,我该怎么说呢?是否有某种可编程的内置对象,我可以使用 Javascript 访问它来进行数据操作,从而取代 Web 服务器的传统位置?
谢谢您的宝贵时间。
Hi exalted sages of the development world,
I humbly come before thee with a noob question. I'm actually pretty excited about Windows 8 Metro HTML5/Javascript development, but I haven't dived in to it yet. One initial question that immediately came up that Google has failed me on so far is how do I do local data access with metro HTML apps? I understand that I can use some of the new HTML5 local storage features, but what do I do say if I want to have an application that writes/receives data to say a SQL CE database on the local machine as opposed to a remote one? Is there some kind of programmable built in object that I can access with Javascript to do data manipulation with that would take the traditional place of a web server?
Thank you for your time.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
WinRT 中没有用于 SQL 访问的客户端。要访问此类数据库,您必须创建一个 Web 服务并调用它(类似于 Silverlight)。 WCF RIA 服务为此提供支持。
要在本地存储和检索数据,可以使用 JET API。 HTML 和 JavaScript 应用支持 IndexedDB。所有这些选项都会将数据读取和写入到应用程序的独立存储中;它们不允许自由访问文件系统。
摘自http://www.itwriting.com/blog/4874- data-access-in-windows-8-winrt.html
There is no client for SQL access in WinRT. To access such databases, you have to create a web service and call it (similarly to Silverlight). WCF RIA Services are supported for this.
To store and retrieve data locally, there is JET API. HTML and JavaScript apps support IndexedDB. All these options read and write data to the app’s isolated storage; they do not enable free access to the file system.
Taken from http://www.itwriting.com/blog/4874-data-access-in-windows-8-winrt.html