The following forum(s) are migrating to a new home on Microsoft Q&A (Preview): Developing Universal Windows apps!

Ask new questions on Microsoft Q&A (Preview).
Interact with existing posts until December 13, 2019, after which content will be closed to all new and existing posts.

Learn More

 none
[UWP][C#]Using relational databases in UWP (C#) RRS feed

  • Question

  • Hello, everyone, any help would be much appreciated.

    I'm new to UWP and fairly new to databases, and I am creating a project which is heavily reliant on writing to and reading from relational databases. As far as I'm aware, there is no way to use SQL databases in UWP projects, but XML databases must be used instead.  So my questions are:

    1 - Is it possible to read from and write to SQL databases in UWP?

    2 - Is it possible to use relational databases in XML?

    Any help would be greatly appreciated, thank you in advance!


    • Edited by David_FF Wednesday, November 30, 2016 12:41 PM title tag
    Monday, November 28, 2016 9:48 PM

Answers

  • Hi!

    1 - Is it possible to read from and write to SQL databases in UWP? 

    ==> Unfortunately not. 

    You have three possibilities : 

    • If your application has to handle the on line /off line, you can use SQLite Database (for using the UWP application when the user is offline and is more efficient than relational databases in XML) with SyncFramework (for synchronizing datas to SQL database once the user is online). You'll find informations about SQLite database in this link : http://blogs.u2u.be/diederik/post/2015/09/08/Using-SQLite-on-the-Universal-Windows-Platform.aspx.
    • If your application is on line only, use WebServices in order to read and write to SQL databases.
    • You can use Azure Mobile

    2 - Is it possible to use relational databases in XML?

    ==> Personnaly I'm not fan of this kind of databases

    Hope it will be useful.

    Please, if this answer is enough for you or correct mark it as "Answer"


    SVP utiliser le Marquer comme reponse; sur les reponses qui vous aide car cela permet aux personnes qui peuvent rencontrer le meme probleme que vous, de retrouver rapidement quelle est la reponse qui a resolu leur probleme. De plus, cela encourage aussi la personne qui a repondu a votre question, et de repondre aux suivantes...

    • Marked as answer by Rustytops Monday, November 28, 2016 10:30 PM
    Monday, November 28, 2016 10:11 PM

All replies

  • Hi!

    1 - Is it possible to read from and write to SQL databases in UWP? 

    ==> Unfortunately not. 

    You have three possibilities : 

    • If your application has to handle the on line /off line, you can use SQLite Database (for using the UWP application when the user is offline and is more efficient than relational databases in XML) with SyncFramework (for synchronizing datas to SQL database once the user is online). You'll find informations about SQLite database in this link : http://blogs.u2u.be/diederik/post/2015/09/08/Using-SQLite-on-the-Universal-Windows-Platform.aspx.
    • If your application is on line only, use WebServices in order to read and write to SQL databases.
    • You can use Azure Mobile

    2 - Is it possible to use relational databases in XML?

    ==> Personnaly I'm not fan of this kind of databases

    Hope it will be useful.

    Please, if this answer is enough for you or correct mark it as "Answer"


    SVP utiliser le Marquer comme reponse; sur les reponses qui vous aide car cela permet aux personnes qui peuvent rencontrer le meme probleme que vous, de retrouver rapidement quelle est la reponse qui a resolu leur probleme. De plus, cela encourage aussi la personne qui a repondu a votre question, et de repondre aux suivantes...

    • Marked as answer by Rustytops Monday, November 28, 2016 10:30 PM
    Monday, November 28, 2016 10:11 PM
  • Thank you very much for your quick reply! :)
    Monday, November 28, 2016 10:30 PM