I got you, buddy, even if it's probably uselessly late!
I just hit this exact issue and forked HDBC-odbc
to fix it. In short: they "foolishly" trusted the MSDN documentation for SQLGetInfo
, which claims that the BufferLength
parameter is more-or-less ignored for non-string information types (say, the SQLUSMALLINT
used when querying SQL_TXN_CAPABLE
).
Well, at least with the MS Access driver, that's not true. I tweaked the querying code to actually pass sizeof(SQLUSMALLINT)
instead of zero, and things seem to be working.
The updated HDBC-odbc
can be had at https://github.com/derrickturk/hdbc-odbc. I intend to put in a pull request as well, but I am not sure if HDBC-odbc
is still maintained.
In any case, if you use stack
, it's as easy as changing your extra-deps
in stack.yaml
to include (replacing any previous source of HDBC-odbc
):
extra-deps:
- git: https://github.com/derrickturk/hdbc-odbc.git
commit: 99cbefb16defc9ce6de77c1434207a78b5c3c365