SQLDatabaseMBS, FreeTDS and transactions

I’m trying this from my Mac to write to a MS SQL Server database (MS SQL Server 64 bit version 13.0.4001 SP1) using the SQLDatabaseMBS class
I’m using the FreeTDSLibrary and the ODBC API to do this

Whats weird is that I can, with autocommit ON, successfully execute any single statement without error

With SQLDatabaseMBS.autocommit on, if I try to execute BEGIN TRANSACTION I get a FreeTDS error saying that after execution the open transaction count is now 1 instead of 0 (well DUH of course)
If I turn SQLDatabase.autocommit off and execute a BEGIN TRANSACTION the begin appears to execute fine
And all the statements in the transaction appear to also execute without error
Even when I finally get to the COMMIT TRANSACTION that appears to execute successfully - but there’s no data in the database (like its been rolled back)

If I comment OUT the code to begin and commit the transaction all the data ends up in the DB - but I really need the transaction to make this an all or nothing insert

Is anyone else using this configuration successfully ?

I got an answer:

ODBC API provides SQLEndTran functions. And SQLAPI++ does use these call inside Commit and Rollback methods. When auto-commit is turned off the transaction should start implicitly with the fist command executed.

If you’d like to use the statements like “BEGIN …”, “END…” - i.e. if you’d like to control the transactions with server specific statements/SQL features then you have to know ODBC drivers internals and understand the way ODBC driver deals with transaction internally.

if I turn autocommit off in the sqldatbasembs instance does that turn the ODBC level code off as well ?
or do I need to do somethign additional to setting that property to disable the ODBC autocommit as well ?