how can we connect a program developed using javascript with openedge database
From the OpenEdge perspective the most logical thing would be to develop a REST service.
Where does this Javascript run? On the server under node.js, there's a npm package called 'jdbc' which seems to give the possibility to connect to any database via JDBC. Connecting to a database from javascript in the browser: don't even think about it.
Hello,
You can connect from JavaScript to the OpenEdge database (via a Business Entity running on the AppServer / PASOE).
You would build a REST service to enable the access via HTTP/HTTPS.
OpenEdge gives you several options to build REST services:
- REST where you use an editor in PDSOE to visually map the parameters in the HTTP request/response to parameters in an ABL class/procedure.
- WebHandlers where the mapping is done programmatically.
- Data Object which uses a prescriptive approach where the mapping is defined via annotations in Business Entities. This a option provides support to access using the JSDO in JavaScript.
Where is your client? Web Browser, Mobile, NodeJS?
Here are some links with examples and additional info:
- Sample programs:
- Mobile Workshop:
You can use the Web Inspector in your web browser to see the source code of the sample programs and use the Network tab to see how it would look like.
For example, the following URL returns data for the Customer table:
oemobiledemo.progress.com/.../Customer
I hope this helps.