Pradeep
Pradeep

Reputation: 5510

how to connect local SQL database from UWP application that can run in Raspberry PI3 device?

I developed UWP application and deployed this application in one of my IOT device. But I want to connect to local SQL database from UWP application that can run in the IOT device.

For that I created WCF web service project to connect to local database. But my application run In IoT device and database available in my local machine.

Can you please tell me how to connect local SQL database from UWP application that can run in Raspberry PI3 device.

Upvotes: 0

Views: 807

Answers (2)

Stefan Wick  MSFT
Stefan Wick MSFT

Reputation: 13850

With the Windows 10 Fall Creators Update we have added support for .NET Standard 2.0 to UWP. With this you can now use SqlClient APIs to enable this scenario.

For this scenario to work, you need the following configuration: - Visual Studio 2017 Update 4 (or later) - Min version in your UWP project 16299 (=Fall Creators Update) - NETCore version 6.0.1 (or later)

Here is a sample app: https://github.com/StefanWickDev/IgniteDemos/tree/master/NorthwindDemo

Here is the session at Microsoft Ignite 2017 where we demo'ed it: https://myignite.microsoft.com/videos/53541

Upvotes: 1

Ken Tucker
Ken Tucker

Reputation: 4156

The is no way to connect to a sql server database directly from a UWP app. You need to create a web service to connect to the sql server and pass the info to the UWP app. You can use databases like SQLite with a uwp app. To use the sqlite database with a uwp app you can use the entity framework core or sqlite-net to get data to and from it

Upvotes: 0

Related Questions