Store user data in Windows 8 metro app

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-04 00:37:30

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

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

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.

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!