且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

WinRT System.Data - 连接到 SQL

更新时间:2023-11-21 16:57:58

你说得对,System.Data 不存在(当我第一次开始使用 WinRT 时,我也在寻找同样的东西).您也将无法引用它.如果您想与 SQL 数据库通信,您将需要使用某种其他协议(WebService、SOAP、WCF 等).

You are correct, System.Data is not there (I looked for the same thing when I first started messing around with WinRT). You won't be able to reference it either. If you want to talk to a SQL database you're going to need to use some kind of other protocol (WebService, SOAP, WCF, etc.).

有一些可用的 SQLite 端口似乎可以正常工作,这将为您提供本地数据库选项,而不是基于服务器的选项,而无需使用某种中间人来访问数据库.

There are ports for SQLite available that appear to be working which will give you a local DB option but not a server based one without using some kind of middle man to get to the DB.

作为旁注,我个人希望看到一个桌面 Metro 应用程序,它可以连接到例如 SQL Express 数据库,但它目前不在卡片中,而不是跳过箍.

As a side note, I personally would have liked to have seen a desktop Metro app that could connect to a SQL Express Database for instance but it's not currently in the cards without jumping through hoops.