Subject: Re: Way to retrieve UserName/Password

From: "David G. Johnston" <[email-masked]>
Date: Sat, 22 Nov 2025 21:37:27 -0600

On Saturday, November 22, 2025, Igor Korot <[email-masked]> wrote:
>
>
> WHat I'd like to do in my software is to get those parameters and use
> them in the "Connect To DB" dialog.

There is pretty much nothing special about this situation pertaining to
PostgreSQL.  What specific challenge are you encountering?  I have to
imagine nearly all languages have a module/library that handles this 30+
year old file format.

David J.

---

From: Igor Korot <[email-masked]>
Date: Sat, 22 Nov 2025 22:18:09 -0600

Hi, David,

On Sat, Nov 22, 2025 at 9:37 PM David G. Johnston
<[email-masked]> wrote:
> There is pretty much nothing special about this situation pertaining to PostgreSQL.  What specific challenge are you encountering?  I have to imagine nearly all languages have a module/library that handles this 30+ year old file format.

The simplest solution would be to use SQLGetPrivateProfileString().

However, as much as I'd like to, this function distinguishes between
"UserId" and "UserID".

There is also a problem where the odbc.ini file location is different
from distro to distro, which the function above nicely handles, but
I'll need to roll my own some 3rd party library.

Thank you.