locked
use SQLite3 DB in knowFolder?

    Question

  • Hi,

    I'm trying to find a way to share an SQLite database between two javascript applications.

    Until now, we had only one DB, so we used SQLite3 for winRT and SQLite3-WinRT as a wrapper for javascript.

    As far as I know, the only way winRT apps can access a common file is to use know Folders ( Document Library, Music Library, etc.).

    But I didn't manage to open a database using Document Library... 

    Has anyone already encountered this issue?

    I'm not really bound to this solution, so I'm open to other option (if any)!

    Thanks in advance (and my apologies for my poor english) ;)

    Tuesday, July 30, 2013 1:37 PM

Answers

  • I believe SQLite directly accesses the file system. This means the database must be in a location the app has direct access to read and write and so must be in the app data directory. The database cannot be placed on directories such as the KnownFolders which require the file broker to read the files for you.

    There is no way to share the database locally without rewriting SQLite to support streams rather than files.

    The other option would be to store the data off system and provide access via a web service.

    --Rob

    Tuesday, July 30, 2013 1:58 PM
    Moderator

All replies

  • I believe SQLite directly accesses the file system. This means the database must be in a location the app has direct access to read and write and so must be in the app data directory. The database cannot be placed on directories such as the KnownFolders which require the file broker to read the files for you.

    There is no way to share the database locally without rewriting SQLite to support streams rather than files.

    The other option would be to store the data off system and provide access via a web service.

    --Rob

    Tuesday, July 30, 2013 1:58 PM
    Moderator
  • Ok, thanks. That's what I was afraid of...

    Unfortunately, these 2 apps are intended to work offline most of the time so I really need an offline DB.

    I will study the option of having multiple tiles for the same app and make different entry points. Otherwise, it will be two separated databases.

    Thanks for the clarification ;)

    Thomas


    Tuesday, July 30, 2013 2:37 PM