Lately I've been trying to connect a PostgreSQL 9.6 database on my C# project but I've been struggling setting up the connection string correctly due to "Keyword not supported:driver".
After having read tons of information, I downloaded the ODBC.NET, I registered PostgreSQL in ODBC Data Sources (32x), referenced the Microsoft.Data.Odbc.dll in my project's directory and managed to have a successful connection with my database in the Visual Studio's Ultimate 2013, but when it came to accessing the data something went wrong.
This is my connection string and a glimpse of my project:
Furthermore this is my data source information:
If you want to use ODBC to connect to PostgreSQL database use OdbcConnection
You can then instantiate a connection using DSN as ODBC data source identifier.
as specified here
There are also other ways to connect to PostreSQL without using ODBC driver. You might want to look at Npgsql .net library or EntityFramework with Npgsql library. More info about usage can be found here