Store user data in Windows 8 metro app

前端 未结 4 1004
醉梦人生
醉梦人生 2021-02-19 18:28

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 d

相关标签:
4条回答
  • 2021-02-19 18:37

    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

    0 讨论(0)
  • 2021-02-19 18:43

    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.

    0 讨论(0)
  • 2021-02-19 18:47

    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.

    0 讨论(0)
  • 2021-02-19 18:57

    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:

    • How to store and retrieve local application data
    • ApplicationData sample

    That question is also debated here and here

    0 讨论(0)
提交回复
热议问题