beta-tester
Posts: 1377
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

equivalent to DataSet and SqlConnection ?

Wed Jul 15, 2015 12:41 pm

i want to port my existing C# .NET 4.0 Desktop (Any CPU) software to Windows IoT (ARM).
in that software i make use of System.Data.DataSet/System.Data.DataTable/... and access to Microsoft SQL Server (tables and stored procedures) via System.Data.SqlClient.SqlConnection...
but the references i used in the desktop environment does not exist in the univeral environment...
so DataSet, DataTable and SqlConnection are not usable on Windows IoT...

does somebody know how to adapt the functionality or which references i have to use for DataSet / DataTable / SqlConnection?
for DataSet / DataTable i can maybe use other stuff... but to access to a MS SQL Database / Table / StoredProcedure i don't know how to adapt...
{ I only give negative feedback }
RPi B (256MB), B (512MB), B+, ZeroW; 2B; 3B, 3B+; 4B (4GB)

Berndt73
Posts: 11
Joined: Tue Jun 02, 2015 11:13 am

Re: equivalent to DataSet and SqlConnection ?

Thu Jul 16, 2015 12:51 pm

Create a WCF service and pass JSON around.

UndergroundFun
Posts: 44
Joined: Wed Jun 17, 2015 12:57 pm

Re: equivalent to DataSet and SqlConnection ?

Thu Jul 16, 2015 7:57 pm

Rewrite it as a web application. Then just display it through a browser app.

That seems pretty ridiculous that System.Data would not be available. Unless it's just not ready yet.

MieliSpoor
Posts: 2
Joined: Thu Jul 16, 2015 7:39 pm

Re: equivalent to DataSet and SqlConnection ?

Thu Jul 16, 2015 8:31 pm

Have you tried using Linq with EntityFramework 7? If that doesn't work, just create either a WCF Rest service of MVC WebAPI and get all you data that way.

If the device won't have network access in such a way, you can also try SQL-Lite for local storage.

beta-tester
Posts: 1377
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: equivalent to DataSet and SqlConnection ?

Fri Jul 17, 2015 7:37 pm

thank you guys for your answers...
i can not create a WCF service, because i don't have permission to do so on the server, it is not hosted by me.
i only have access to the server database by connectionstring with my user and password authentification.
creating a local SQLite database makes no sense to me...
then i have to communicate to the MS SQL database anyhow, to sync the data. for that i again have the same problem, how to do the transactions between the both databases with only use of connectionstring SqlClients SqlConnections.

or does SQLite have the functionality to mirror/replicate/sync between SQLite and MS SQL?
{ I only give negative feedback }
RPi B (256MB), B (512MB), B+, ZeroW; 2B; 3B, 3B+; 4B (4GB)

scvn
Posts: 1
Joined: Fri Aug 07, 2015 7:11 pm

Re: equivalent to DataSet and SqlConnection ?

Sat Aug 08, 2015 12:33 am

Bumping this since I'm in the same situation as the creator of the post.

beta-tester
Posts: 1377
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: equivalent to DataSet and SqlConnection ?

Sun Aug 09, 2015 4:58 pm

i thinking about to implement the mono adaption of SqlConnection
https://github.com/mono/mono/tree/maste ... .SqlClient

unfortunately the source is currently not done available on microsoft side yet:
https://github.com/dotnet/corefx-progre ... /README.md

but maybe it is better to "yield" and follow the mainstream philosophy of the limited universal possibilities and use web services...
but that will be a very hard thing to persuade the SQL server admin to add those support and give the manpower to implement...
hmm who knows, :?

(i remember, where is was in a similar situation by implementing a Silverlight App and trying to persuade the server admin to do web services without success - the project miserably died because of unwanted supporting the project on server side)
{ I only give negative feedback }
RPi B (256MB), B (512MB), B+, ZeroW; 2B; 3B, 3B+; 4B (4GB)

Return to “Windows 10 for IoT”