Sujet : Re: PJBS for Python
De : arne (at) *nospam* vajhoej.dk (Arne Vajhøj)
Groupes : comp.os.vmsDate : 20. Jan 2025, 01:47:46
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vmk6fi$2kev8$1@dont-email.me>
References : 1 2
User-Agent : Mozilla Thunderbird
On 1/19/2025 5:26 PM, Lawrence D'Oliveiro wrote:
On Sun, 19 Jan 2025 14:35:07 -0500, Arne Vajhøj wrote:
But it is a bit more interesting on VMS as a driver for VMS is not a top
priority for most language projects and database vendors. But the
database vendors usually provide a type 4 JDBC driver. A type 4 JDBC
driver is a pure Java JDBC driver, which means that you can copy the jar
file from Linux/Windows to VMS and it works.
If they have a client library for C, say, then you should be able to
create a pure-Python wrapper around it using ctypes.
There are some possibilities for some databases.
MS SQLServer is probably the easiest. I believe FreeTDS can build
on VMS and pymssql can use FreeTDS, so someone just need to figure
everything out on how to make it build on VMS. Also as fallback
the TDS protocol is known (FreeTDS and jTDS) and a pure Python
solution (using TCP to port 1433) could be developed. All that
is required is some work.
Oracle DB client lib (OCI not to be confused with OCI!) was
available in an old version on older VMS platforms, but
will not be available on VMS x86-64. So that seems like
a dead end future wise. Then there are the commercial ODBC
solutions.
IBM DB2 client lib has never been available on VMS AFAIK.
That leaves commercial ODBC solutions, if they support DB2,
which is far from a given.
Then there is the SQLRelay solution. There are both PHP
and Python clients for that. They could be ported to
VMS. Again just work. But that is also with a proxy
and even though SQLRelay proxy is a way more robust and
supported solution than PJBS, then it does not even run
on VMS - it has to run on Linux or Windows.
Compared to that:
* translating 123 lines of PHP to 61 lines of Python
* write 46 lines of Python to get DB API 2.0 API
is dirt cheap to get all 3 working!!
But if someone has a serious need for like MS SQLServer
access, then they should be able to make it work.
Arne