Page 1 of 1

how connect to databse in PostgresSQL

Posted: Tue Dec 22, 2015 5:58 pm
by mar332
I don't know how connect to databse in PostgresSQL. I would like used library npgsql. It is impossible.
Help.

Re: how connect to databse in PostgresSQL

Posted: Tue Dec 22, 2015 7:43 pm
by ricl
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).

Re: how connect to databse in PostgresSQL

Posted: Wed Dec 23, 2015 8:35 am
by mar332
Thank ricl, but I would like connect database on RPI 2 - it is ARM.

Re: how connect to databse in PostgresSQL

Posted: Wed Dec 23, 2015 8:48 am
by ricl
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).

Re: how connect to databse in PostgresSQL

Posted: Wed Dec 23, 2015 9:56 am
by mar332
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?

Re: how connect to databse in PostgresSQL

Posted: Wed Dec 23, 2015 10:09 am
by ricl
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.