Olan,
Exactly that is what we do (DSN Less connection) to connect to Postgresql 11 from PB 2019 R3 application. It's working. We read details from a ini file. Here is a snippet
*******************************************************
SQLCA.DBMS = ProfileString (ls_ini_name, "Profile " + Trim(ls_profile), "DBMS", '????')
SQLCA.DBParm = ProfileString(ls_ini_name, "Profile " + Trim(ls_profile), "DBParm", "")
SQLCA.Lock = ProfileString(ls_ini_name, "Profile " + Trim(ls_profile), "Lock", '????')
SQLCA.Servername = ProfileString(ls_ini_name, "Profile " + Trim(ls_profile), "ServerName", '????')
SQLCA.Autocommit = True
ll_sqlca = SQLCA.of_connect();
********************************************************
contents of the ini file [ ini file will contain profile of more than one database, and user can choose one in the login screen ]
***************************************************
[Profile Yasotha Motors]
DBMS=ODBC
ServerName=192.168.1.76
DBParm="ConnectString='Driver=PostgreSQL Unicode;Database=yasothamotors;Server=192.168.1.76;Port=5432;UID=user;PWD=pass;',DisableBind=1"
Lock="RC"
***********************************************
We construct the DBParm string in a separate input screen and write that value in the ini file.
ODBC driver plays and important role here. Depending on the driver file, it installs in different name. Try to use the same driver file in every place. We use psqlodbc_x86.exe, which installs the driver in the name 'PostgreSQL Unicode'. [ and also PostgreSQL ANSI].
It works fine from exe so far [ installed in 2 client places, so far apart from my office ]
HTH
Happiness Always
BKR Sivaprakash
Thank you!