Active3 years, 8 months ago
I am setting up an database application to be database agnostic, and when testing with postgresql I get the standard dsn error:
Mar 16, 2017 Connect to PostgreSQL with the PostgreSQL ODBC driver (psqlODBC) ODBC drivers aren't listed in the drop-down list of data sources. To connect with an ODBC driver, start by selecting the.NET Framework Data Provider for ODBC as the data source on the Choose a Data Source or Choose a Destination page.
[IM002] [Microsoft][ODBC Driver Manager] Data source name not found
I usually use SQL server and MySQL so I'm new to postgres, I tried the standard recommended Connection string:
I also tried the name of the odbc driver that I installed after installing postrgesql:
Setting up a DSN in odbc manager also works perfectly using the unicode driver, so I cant understand why i cant connect in my application, is there an error in the driver name that i am using in the connection string?
Soner Gönül
83.6k2727 gold badges161161 silver badges294294 bronze badges
sjwbondsjwbond
2 Answers
Your error message looks very strange. It tells about DSN not found. Are you sure you use connect string with Driver=...
?
You can use ODBC connect string in several forms. At first you have created DSN, so you can use it:
Then you can use other form of connect string:
Both work on my old 32 bit Windows environment. I test them with simple Python script (I use ActiveState Python in which there is simple odbc
module):
Michał Niklas
Michał Niklas42.5k1414 gold badges5959 silver badges9494 bronze badges
When you created the DSN, did you create it with the correct odbcad tool? With the 64bit version found in C:WindowsSystem32
if your application is 64bit and with the 32bit version found in C:WindowsSysWOW64
if your application is 32bit?
erg
erg1,31111 gold badge77 silver badges1616 bronze badges
Not the answer you're looking for? Browse other questions tagged c#databaseodbcpostgresql-9.5 or ask your own question.
From Devart: Devart ODBC Driver for PostgreSQL provides high-performance and feature-rich connectivity solution for ODBC-based applications to access PostgreSQL databases from Windows, Linux and Mac OS X, both 32-bit and 64-bit. Full support for standard ODBC API functions and data types implemented in our driver makes interaction of your database applications with PostgreSQL fast, easy and extremely handy. Key Features: - Direct Connection. Database applications based on our solution get an opportunity to establish connection to PostgreSQL in Direct Mode. Direct Mode gives your applications an unrivalled advantage - connection to PostgreSQL databases directly via TCP/IP avoiding PostgreSQL Client. That improves performance of your applications, their quality, reliability and especially the deployment process, since there is no need to supply additional client software together with your application. - Secure connection support via SSH protocol, SSL protocol and HTTP tunnel. - Development Platforms Variety. ODBC driver for PostgreSQL doesn't limit your choice of the development platform and environment. The driver installations are available for various operational systems and platforms. The current version supports Windows, Linux and Mac OS X, both 32-bit and 64-bit. - ODBC Conformance. Our ODBC driver provides full support for common ODBC interface: * ODBC Data Types support * ODBC API Functions support In addition, we provide support for Advanced Connection String parameters. Thus allowing any desktop and web applications to connect to PostgreSQL from various environments and platforms, that support ODBC. - DB Compatibility. Our driver is compatible with major and the latest PostgreSQL server versions since 7.1 up to 9.2. - Microsoft Power BI Desktop and Microsoft Visual FoxPro compatibility. - Improved compatibility with MS Visual Studio, MS Fox Pro, MapInfo, Libre Office, Qlik, Delphi & C++Builder, MS Access.
Microsoft Odbc Driver For Postgres Update
What do you need to know about free software?
Install Postgresql Odbc Driver
From Devart: Devart ODBC Driver for PostgreSQL provides high-performance and feature-rich connectivity solution for ODBC-based applications to access PostgreSQL databases from Windows, Linux and Mac OS X, both 32-bit and 64-bit. Full support for standard ODBC API functions and data types implemented in our driver makes interaction of your database applications with PostgreSQL fast, easy and extremely handy. Key Features: - Direct Connection. Database applications based on our solution get an opportunity to establish connection to PostgreSQL in Direct Mode. Direct Mode gives your applications an unrivalled advantage - connection to PostgreSQL databases directly via TCP/IP avoiding PostgreSQL Client. That improves performance of your applications, their quality, reliability and especially the deployment process, since there is no need to supply additional client software together with your application. - Secure connection support via SSH protocol, SSL protocol and HTTP tunnel. - Development Platforms Variety. ODBC driver for PostgreSQL doesn't limit your choice of the development platform and environment. The driver installations are available for various operational systems and platforms. The current version supports Windows, Linux and Mac OS X, both 32-bit and 64-bit. - ODBC Conformance. Our ODBC driver provides full support for common ODBC interface: * ODBC Data Types support * ODBC API Functions support In addition, we provide support for Advanced Connection String parameters. Thus allowing any desktop and web applications to connect to PostgreSQL from various environments and platforms, that support ODBC. - DB Compatibility. Our driver is compatible with major and the latest PostgreSQL server versions since 7.1 up to 9.2. - Microsoft Power BI Desktop and Microsoft Visual FoxPro compatibility. - Improved compatibility with MS Visual Studio, MS Fox Pro, MapInfo, Libre Office, Qlik, Delphi & C++Builder, MS Access.