locked
Storing Data In Metro App

    Question

  • Hi All,

    I am new to Metro app development using JAVASCRIPT & HTML5. I am trying to create a scheduler which will save the events for particular date and time.I want to store this information like event name, start & end time and also little description of the event in the database, so that when I open the application (scheduler in my case) the application should populate the previous saved data.

    Can you guys please guide me how to save the data locally in metro style app.

    Help would be highly appreciated.

    Thanks,

    Vishwajeet.

    Friday, January 17, 2014 4:23 AM

Answers

  • Hi,

    indeed IndexedDB is the only official solution for now in JS Apps. But as a personnal consideration, and if you have a lot a datas to store, I would suggest you to use this magic SQLite lib for WinJS : SQLite3-WinRT. I currently use it in one of my apps, and it works really great.

    I you haev any problem to configure it, don't hesitate to post an issue on their GitHub, they usually answer very quickly.

    Sylvain

    Saturday, January 18, 2014 10:45 AM

All replies

  • use local storage

    Local storage

    To store large amounts of app data or when you need to save data to a file immediately, use WinJS.Application.local. Don't use local storage to perform smaller reads and writes.

    This could help you :  Using to local storage to save composite data
    • Edited by Ramya SJ Friday, January 17, 2014 10:45 AM
    Friday, January 17, 2014 10:40 AM
  • Thanks for the reply. It will surly help me.I will try this and then let you know the result.

    One thing I want to know, If I want to use IndexedDB to save the data locally, Can I do it ?

    Thanks,

    Friday, January 17, 2014 12:33 PM
  • If you want to use IndexedDB I suppose you could use the ApplicationDataComposite class which stores data in terms of key value pairs.

    Or may be you can just index the app local data refer to this link

    • Edited by Ramya SJ Friday, January 17, 2014 2:22 PM
    Friday, January 17, 2014 2:19 PM
  • Hi,

    indeed IndexedDB is the only official solution for now in JS Apps. But as a personnal consideration, and if you have a lot a datas to store, I would suggest you to use this magic SQLite lib for WinJS : SQLite3-WinRT. I currently use it in one of my apps, and it works really great.

    I you haev any problem to configure it, don't hesitate to post an issue on their GitHub, they usually answer very quickly.

    Sylvain

    Saturday, January 18, 2014 10:45 AM