The Mixed Reality Forums here are no longer being used or maintained.
There are a few other places we would like to direct you to for support, both from Microsoft and from the community.
The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.
For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.
If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.
And always feel free to hit us up on Twitter @MxdRealityDev.
MySql server data retrieval on 2D UWP UI
So, for a simple example,
Let's say there's an employee table and and a simple XAML UI that displays employee data using textblocks.
I have connected to the MySql server in VS 2015 and also I am able to query data in the query window.
The question, is how do I connect the data from the query to the UI?
I can't use the sqlcommand and use a reader ( the usual approach) as "using System.Data.SqlClient;" is not available.
Thank you
Best Answer
-
OptionsJimbohalo10 ✭✭✭
Hi @chiddaan
You will need to add the NuGet package using "Manage NuGet Packages" on your VS Solution before you can connect to the database on any Visual Studio project and add the following dependencies in the project.json in your VS Solution{
"dependencies": {
"Microsoft.NETCore.UniversalWindowsPlatform": "5.3.1",
"System.Data.SqlClient": "4.3.0"
},
"frameworks": {
"uap10.0": {}
},
"runtimes": {
"win10-x86": {},
"win10-x86-aot": {}
}
}
Save and Restore NuGet PackagesNow you can add
#using System.Data.SqlClient;
without error5
Answers
What engine are you using? .NET only, Unity?
for this, just the .Net. It's UWP app.
No Unity in this one.
Hi @chiddaan
You will need to add the NuGet package using "Manage NuGet Packages" on your VS Solution before you can connect to the database on any Visual Studio project and add the following dependencies in the project.json in your VS Solution
{
"dependencies": {
"Microsoft.NETCore.UniversalWindowsPlatform": "5.3.1",
"System.Data.SqlClient": "4.3.0"
},
"frameworks": {
"uap10.0": {}
},
"runtimes": {
"win10-x86": {},
"win10-x86-aot": {}
}
}
Save and Restore NuGet Packages
Now you can add
#using System.Data.SqlClient;
without error
Hi @Jimbohalo10 , I will try and make use of your solution.
But I tried adding a NuGet package using the UI, for sql server. while installing it would give me error saying it's incompatible.
Oh well, it worked :P THanks