[python-win32] adodbapi changing autocommit
Tim Roberts
timr at probo.com
Sun Oct 23 17:59:27 EDT 2016
On Oct 22, 2016, at 9:42 PM, Max Slimmer III <maxslimmer at gmail.com> wrote:
>
> Setting connection.autocommit = False does not cause a
> connection.connector.BeginTrans() and so any subsequent
> connection.commit() raises an exception that there is no open
> transaction. Is this by design and I'm supposed to explicitly call
> BeginTrans() when switching autocommit off?
Yes, that's exactly the tradeoff. If you have auto commit on, ADO will wrap each operation in a transaction. If you have auto commit off, then you have to insert the transaction markers yourself.
—
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the python-win32
mailing list