TransWikia.com

Visual Studio 2017 Enterprise C++ Connect to to Postgressql Server

Software Recommendations Asked by Willi on September 25, 2021

What is the best way to connect from C++ to a postgressql server? An important limitation is that there can’t be any additional software installations (some .exe or .misi files that install the driver). Furthermore, all configuration must be done through the C++ application.

Is there some library that can be bundled as a .dll or as .h and .cpp source files? The library/driver must also work on Linux.

One Answer

Are you using .NET Framework, or producing unmanaged code? NPGSQL is the most popular Postgres driver for .NET and it works with Entity Framework. It is available on Linux if you are using .NET Core.

Other than that, an ODBC-compliant driver is your best bet. I know for a fact there are ODBC drivers for Postgresql, but I cannot comment on their quality, as I have always used Npgsql. My experiences with Postgresql and JDBC have been very positive, however.

Answered by Scott Simontis on September 25, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP