WinRT/Metro 应用程序的本地数据库存储

发布于 2025-01-07 01:17:39 字数 1437 浏览 7 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

初雪 2025-01-14 01:17:39

SQLite 现已正式支持。请参阅 Tim Heuer 的博客 了解详情。对于数据较少的更简单的解决方案,您可以使用 http://winrtdatabase.codeplex.com/

SQLite is now officially supported. See Tim Heuer's blog for details. For simpler solution with less data you can use http://winrtdatabase.codeplex.com/

ゃ人海孤独症 2025-01-14 01:17:39

您可能想看看 SQLite3-WinRT,它是 SQLite,我们编写它是为了在 Metro 风格的应用程序中使用它。它包含一个仅使用 WinRT 兼容 API 的 SQLite 版本,以及一个在 C# 和 JavaScript 应用程序中使用它的 WinRT 组件。

You might want to have a look at SQLite3-WinRT, a wrapper for SQLite that we wrote to use it in a Metro-style application. It contains a version of SQLite that uses only WinRT-compatible API, and a WinRT component to use it in C# and JavaScript apps.

夕色琉璃 2025-01-14 01:17:39

Metro 没有可用的 SQL CE。

a) 不会有任何本地数据库

这是不正确的。 SQLite 应该能够在 WinRT 上运行。您可以在此处下载代码,并将两个主文件包含到您的 WinRT 项目中。要编译并通过认证,您需要确保对不支持的 Win32 调用使用正确的 WinRT 替换调用。 Bob 提到的第 3 方解决方案是一个 WinRT 包装器,它不包括对 SQLite 进行更改以通过认证。

(b) 没有本地“服务器”数据库(即 SQL Express 类型实例)

似乎不太可能有用于 Metro 的 SQL Express。

(c) 名为“Jet Blue”的本地数据库代码。

如果您指的是 Microsoft Jet 数据库引擎,是的,似乎受支持,但我宁愿使用 SQLite。

另请记住,如果您使用 HTML/JS,您可以选择使用 IndexedDB

There is no SQL CE available for Metro.

a) will be no local databases whatsoever

This is not true. SQLite should be able to run on WinRT. You can download the code here and include the two main files into your WinRT project. To compile and pass certification you will need to make sure you are using the correct WinRT replacement calls for the Win32 calls that are not supported. The 3rd party solution Bob mentioned is a WinRT wrapper it doesn't include changes to SQLite to pass certification.

(b) no local "server" databases (i.e. SQL Express type instances)

It seems unlikely there will be SQL Express for metro.

(c) A local database code named "Jet Blue".

If you mean Microsoft Jet Database engine, yes that seems to be supported but I would rather use SQLite.

Also remember if you are using HTML/JS you have the option of using IndexedDB

伴梦长久 2025-01-14 01:17:39

根据此,没有(内置)数据库
http://channel9.msdn.com/Events/BUILD/BUILD2011/TOOL-930C

There is no (built in) database according to this
http://channel9.msdn.com/Events/BUILD/BUILD2011/TOOL-930C

与风相奔跑 2025-01-14 01:17:39

有第三方解决方案即将推出或已经推出。 CodePlex 有一个 - http://sqlwinrt.codeplex.com/

另一个选项,需要做一些工作您的职责是通过 Web 服务代理您的数据库访问。

There are 3rd party solutions coming out or are already out. CodePlex has one -- http://sqlwinrt.codeplex.com/

The other option, which requires some work on your part, is to proxy your database access through a web service.

紧拥背影 2025-01-14 01:17:39

您真的需要“为偶尔连接的应用程序存储数据”吗?这对我来说听起来有点过分了。为什么不自己将数据(各种选项)序列化存储?

Do you really need a "store data for an occasionally connected application"? This sounds a little overkill to me. Why not serialize the data (various options) to storage yourself?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文