Sorry, the attached test program is the right one.
Try adding the following line in postgresql.conf and run your program:
log_statement = 'all'
If SQL_AUTOCOMMIT_OFF is effective, these lines are output in the server log. This shows that the ODBC driver sent
BEGINat the first SQL statement in a transaction, and the application explicitly committed the transaction with
SQLEndTran(SQL_COMMIT).
LOG: statement: BEGIN;INSERT INTO a VALUES(100)
LOG: statement: COMMIT
If SQL_AUTOCOMMIT_ON is effective, this line is output. The ODBC driver doesn't send BEGIN.
LOG: statement: INSERT INTO a VALUES(100)
Regards
Takayuki Tsunakawa