SQL connection in UWP app

前端 未结 2 1722
一向
一向 2020-12-22 00:41

I have am existing project that runs on windows, mac, ios and android. I\'m looking for a way to make a windows phone version, but I can\'t figure out how to use SQL. My cur

2条回答
  •  悲哀的现实
    2020-12-22 00:51

    If you want to connect a local database, for example the SQLite, there are implemented libraries could be used do this stuff:

    A Developer's Guide to Windows 10: (10) SQLite Local Database

    If you want to connect a server-based database, for example, the SQL Server database, unfortunately, there is not a built-in API like ADO.NET that could be used to connect the SQL Server directly. And for a workaround, you would have to utilize a middle layer for example, the WCF Serrvie:

    How to access data from SQL Server database in Windows Store app, although this sample is written for store app, the used approach is the same for UWP application.

提交回复
热议问题