I'm trying to set up a remote connection to PostgreSQL 9.2 under Windows. On the server in pg_hba.conf added

 host all postgres 192.168.0.101 trust 

and in postgresql.conf

 listen_addresses = '*' 

There is an application using ADO.NET. For connection to a DB I use OdbcConnection. Crashes with:

[Microsoft] [ODBC Driver Manager] Data source not found and default driver not specified

The ODBC connector is installed, but when trying to test connect a message that the server is not responding. I understand that the question is not quite here ... but still: what to do with this beast (PostgreSQL) in this question?

PS I use it for the first time, I need to measure the execution time of the request from my client to different types of DBMS, therefore I use Postgre.

    1 answer 1

    Well, I think the easiest way to start is that:

    • Create a file anyname.udl on your desktop or wherever you want.
    • Open it with a mapped program.
    • Using this dispatcher, configure the connection by selecting the appropriate provider and its required settings.
    • Save the changes.
    • Open the modified file with notepad, in the form of text you will see the connection string.

    Further, you can use this line to your taste by sprinkling it with passwords and logins as needed.

    PS: There are suspicions that you either didn’t really install the provider, or installed a provider that does not correspond to the bitness of the application that uses it ... I had something similar for a long time and it’s not true.