1. Download and install 32-bit version of PostgreSQL ODBC driver.
https://www.postgresql.org/ftp/odbc/versions/msi/
https://ftp.postgresql.org/pub/odbc/versions/msi/psqlodbc_12_00_0000-x86.zip
2. Launch 32-bit version of odbcad32.exe
c:\Windows\SySWOW64\odbcad32.exe
and make sure the driver is installed.
Notice the exact driver name, e.g. PostgreSQL Unicode
3. In Rapise construct the connection string using the following syntax (ADODB format):
Driver={PostgreSQL Unicode}; Server=<server url>; Port=<port>; Database=<database name>; Uid=<username>; Pwd=<password>;
Connecting to the database in JavaScript
Database.DoAttach(
'Driver={PostgreSQL Unicode}; Server=localhost; Port=5432; Database=mydb; Uid=postgres; Pwd=password;',
'SELECT * FROM users');
while(Database.DoSequential())
{
Tester.Message("Last Name: " + Database.GetValue("lastname"));
}
Connecting to the database in RVL