I need to write an Openedge 11.6.4 ABL procedure that automatically:
- Connects to a PostgreSQL database.
- Read some info and write it in my OpenEdge DB.
- Disconnect from PostgreSQL.
My problem is in the connection part.
Is that possible?
I need to write an Openedge 11.6.4 ABL procedure that automatically:
My problem is in the connection part.
Is that possible?
2
Answers
As you’re still on OpenEdge 11.6 (very old) you can still use the OpenEdge DataServer for ODBC. This feature is retired from OpenEdge 11.7 on:
https://community.progress.com/s/article/Frequently-asked-questions-regarding-the-DataServer-for-ODBC-phaseout
"OpenEdge 11.6 is the last OpenEdge version with the DataServer for ODBC engine."
To use the Data Server you will need a license for this product from Progress Software.
Depending on the use-case and the frequency of the import, it might be easier to export from PostgresSQL into plain text files, XML or JSON and import that using ABL programs.
If you need a frequent and potentially bi-directional replication I would prefer to write a web service (in whatever language) that connects to your PostgreSQL database and exposes the data using REST.
You can do it with ADODB with a ODBC driver
Example:
Some other code samples:
https://community.progress.com/s/question/0D74Q000007tLORSA2/detail
https://www.w3schools.com/asp/ado_connect.asp