MSSQL does not autocommit on EXEC

Issue #1385 resolved
Former user created an issue

The MSSQLExecutionContext does not consider EXEC to be an autocommittable keyword so that stored procedures that make modifications end up not being committed if you are using autocommit to do so.

The attached patch fixes this and also adds support for pymssql's autocommit feature in versions greater than 0.8.0 via a connection argument.

Comments (4)

  1. Former user Account Deleted

    updated the patch slightly as dbapi.version_info doesn't need to be checked twice

  2. Mike Bayer repo owner

    for EXEC I'd favor text("EXEC foo", autocommit=True) for now. For the native "autocommit" feature, that can't be added casually. I'd want a comprehensive feature that determines how all backends can take advantage of the autocommit features available with most DBAPIs, so it would have to be implemented throughout the engine/dialect system.

  3. Log in to comment