Use a Connection Handle When Calling SQLTransact
Performance impact: Large
You should always call
SQLTransact with a valid HDBC
and a null environment handle.
SQLTransact (SQL_NULL_HENV, ValidHDBC, fType)
It is possible to call SQLTransact with a non-null environment handle and a null connection handle, but that usage is not recommended as it abruptly commits or rolls back every transaction for the process, which is slow and can cause unexpected application behavior.