在 Windows 8 Metro 应用中存储用户数据

发布于 2024-12-28 06:31:09 字数 95 浏览 4 评论 0 原文

我正在学习如何开发 Windows 8 Metro 风格应用程序,但我找不到在 SQL Server 中存储用户数据的方法。

我可以使用什么或如何存储用户数据。

I am learning how to develop Windows 8 Metro style apps but i couldn't found a way to store user data in SQL Server for example.

What could i use or how to store user data.

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

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

发布评论

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

评论(4

空‖城人不在 2025-01-04 06:31:09

您无法从 Metro 应用程序访问本地“桌面服务”。因此您将无法与本地 SQL Server 通信。
您可以使用存储您的信息的在线服务,也可以使用本地存储。

请查看:

这个问题也有争议 此处此处

You cannot access local "desktop services" from the Metro app. So you will not be able to communicate with a local SQL Server.
You can use online services that store your information or you can use local storage.

Take a look at:

That question is also debated here and here

仙女 2025-01-04 06:31:09

您可以将 SQLite 用于 Windows 运行时

这是一篇解释如何使用它的博客文章:

http://timheuer.com/blog/archive/2012/08/07/updated-how-to-using-sqlite-from-windows-store-apps.aspx

You can use SQLite for Windows Runtime

Here is a blog post explaining how to use it:

http://timheuer.com/blog/archive/2012/08/07/updated-how-to-using-sqlite-from-windows-store-apps.aspx

森罗 2025-01-04 06:31:09

有几种存储数据的方法 - 漫游设置(如果您希望在安装了您的应用程序的所有 win8 设备上都可以使用相同的数据)、独立存储中的应用程序设置。关于在 SQL Server 中存储数据,由于您无法使用 Metro 应用程序部署 SQL 数据库,因此您需要有一个客户端-服务器架构来在 SQL Server 数据库前面托管您的服务。

There are couple of ways of storing data - Roaming Settings (if you want the same data to be available across all the win8 devices he has installed your application), Application Settings in Isolated Storage. About storing data in SQL server, as you cannot deploy sql database with Metro app, you need to have a client-server arch to host your service in front of a sql server db.

︶葆Ⅱㄣ 2025-01-04 06:31:09

除了您已经得到的答案之外,不要忘记标准的 HTML5 localStorage,它应该跨平台工作,因此有助于代码的可重用性。允许多少空间并不是标准,但所有平台上事实上的标准量约为 5MB。 Windows 8 上的 Metro 风格应用程序可能更多,但这只是猜测。

In addition to the answers you've already gotten, don't forget standard HTML5 localStorage, which should work across platforms and therefore help code reusability. What's not a standard is how much space you're allowed, but the de facto standard amount is about 5MB in all platforms. It might be more on Windows 8 for Metro style apps, but that's just a guess.

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