Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Local database storage for WinRT/Metro applications [closed]

I am trying to find an API within WinRT that will allow me to create a local database that can be used to store data for an occasionally connected application. I am looking for something like SQL Compact Edition.

I have seen various messages on various boards indicating that there either

  • (a) will be no local databases whatsoever
  • (b) no local "server" databases (i.e. SQL Express type instances)
  • (c) A local database code named "Jet Blue".

Does anybody have a definitive answer to this? I do not want to start down this road if it is blocked.

like image 975
Martin Robins Avatar asked Feb 18 '12 15:02

Martin Robins


3 Answers

SQLite is now officially supported. See Tim Heuer's blog for details. For simpler solution with less data you can use http://winrtdatabase.codeplex.com/

like image 72
Sergey Barskiy Avatar answered Nov 08 '22 00:11

Sergey Barskiy


You might want to have a look at SQLite3-WinRT, a wrapper for SQLite that we wrote to use it in a Metro-style application. It contains a version of SQLite that uses only WinRT-compatible API, and a WinRT component to use it in C# and JavaScript apps.

like image 39
superquadratic Avatar answered Nov 07 '22 22:11

superquadratic


There is no SQL CE available for Metro.

a) will be no local databases whatsoever

This is not true. SQLite should be able to run on WinRT. You can download the code here and include the two main files into your WinRT project. To compile and pass certification you will need to make sure you are using the correct WinRT replacement calls for the Win32 calls that are not supported. The 3rd party solution Bob mentioned is a WinRT wrapper it doesn't include changes to SQLite to pass certification.

(b) no local "server" databases (i.e. SQL Express type instances)

It seems unlikely there will be SQL Express for metro.

(c) A local database code named "Jet Blue".

If you mean Microsoft Jet Database engine, yes that seems to be supported but I would rather use SQLite.

Also remember if you are using HTML/JS you have the option of using IndexedDB

like image 3
sarvesh Avatar answered Nov 08 '22 00:11

sarvesh