mar332
Posts: 26
Joined: Tue Dec 22, 2015 5:46 pm

how connect to databse in PostgresSQL

Tue Dec 22, 2015 5:58 pm

I don't know how connect to databse in PostgresSQL. I would like used library npgsql. It is impossible.
Help.

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: how connect to databse in PostgresSQL

Tue Dec 22, 2015 7:43 pm

For SQL in general

47. Does Windows 10 Core IoT support SQL

A Developer's Guide to Windows 10: (10) SQLite Local Database
https://channel9.msdn.com/Series/A-Deve ... dows-10/10

Andy Wigley's Blog about it
http://andywigleyblog.azurewebsites.net/?p=721

and on GitHub

https://github.com/Windows-XAML/201505- ... SQLiteDemo



For libraries that access off device databases you will have to wait for the local supply of giants to move in (i.e the developers need to target ARM IoT or provide a Web REST API interface).
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

mar332
Posts: 26
Joined: Tue Dec 22, 2015 5:46 pm

Re: how connect to databse in PostgresSQL

Wed Dec 23, 2015 8:35 am

Thank ricl, but I would like connect database on RPI 2 - it is ARM.

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: how connect to databse in PostgresSQL

Wed Dec 23, 2015 8:48 am

But the stuff I posted up thread is for ARM on Windows 10 Core IoT.

Do you have the wrong forum?

There is always https://github.com/npgsql/npgsql but that may need some changes to make it work in IoT (hence the giants comment above).
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

mar332
Posts: 26
Joined: Tue Dec 22, 2015 5:46 pm

Re: how connect to databse in PostgresSQL

Wed Dec 23, 2015 9:56 am

When i used npgsql in VS2015 i have error:

There was a mismatch between the processor architecture of the project being built "ARM" and the processor architecture of the reference "System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

NPGSQL does not work under the ARM I think. What I should change?

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: how connect to databse in PostgresSQL

Wed Dec 23, 2015 10:09 am

You are apparently using the wrong lib/dll reference. You need the ARM compilation for that library.

In any case, it is likely that a comment on that GitHub will provide a more accurate answer.
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

Return to “Windows 10 for IoT”