[Info-vax] SQL Relay

Arne Vajhøj arne at vajhoej.dk
Tue Jun 15 15:54:56 EDT 2021


VSI has ported SQL Relay client to VMS (Alpha and Itanium).

That solves the specific problem of connecting to Oracle
databases when Oracle support for Oracle client on VMS goes
away.

But it actually provides a lot more. It gives VMS connectivity to
practically all databases using a single API. And for free. What is
not to like about that.

:-)

So I started playing a bit with it. And after a few bumps on the
road then it actually works great.

I accessed Oracle, DB2, PostgreSQL, MySQL, Rdb and Mimer databases.

I tested with:
* C using C API
* C++ using C++ API
* Pascal using VMS API
* Fortran using VMS API
* C using embedded SQL (Oracle only)
* Cobol using embedded SQL (Oracle only)

The difference between C API, C++ API and VMS API is just the normal 
difference:

stat = sqlrcur_sendQuery(curs, "SELECT f1,f2 FROM t1");

int stat = curs->sendQuery("SELECT f1,f2 FROM t1");

stat := sqlr$cur_sendquery(curs, 'select f1,f2 from t1');

Full code exampples, build commands and setup are at:
    https://www.vajhoej.dk/arne/articles/vmstd2.html

Note that the VMS API makes it easy to use from languages like Cobol,
Fortran, Pascal and Basic, which is a nice since most native
database API's today are C/C++ centric.

Arne



More information about the Info-vax mailing list