diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-09-01 19:16:17 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-09-01 19:16:17 -0400 |
| commit | 73d5b74f26a5f13baa01e458b69c0657e520d944 (patch) | |
| tree | 1e651af71197844a8df79cde5265ed2cfd9815e6 /lib/sqlalchemy/dialects/mssql | |
| parent | 51f1fdf3e40065e349310a6ba9a49306b9648160 (diff) | |
| download | sqlalchemy-73d5b74f26a5f13baa01e458b69c0657e520d944.tar.gz | |
- get all tests within -w engine + pyodbc:mssql on windows to pass
Diffstat (limited to 'lib/sqlalchemy/dialects/mssql')
| -rw-r--r-- | lib/sqlalchemy/dialects/mssql/base.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/sqlalchemy/dialects/mssql/base.py b/lib/sqlalchemy/dialects/mssql/base.py index bccd585d0..9c2c1555d 100644 --- a/lib/sqlalchemy/dialects/mssql/base.py +++ b/lib/sqlalchemy/dialects/mssql/base.py @@ -671,7 +671,7 @@ class MSExecutionContext(default.DefaultExecutionContext): self.root_connection._cursor_execute(self.cursor, "SET IDENTITY_INSERT %s ON" % self.dialect.identifier_preparer.format_table(tbl), - ()) + (), self) def post_exec(self): """Disable IDENTITY_INSERT if enabled.""" @@ -680,10 +680,10 @@ class MSExecutionContext(default.DefaultExecutionContext): if self._select_lastrowid: if self.dialect.use_scope_identity: conn._cursor_execute(self.cursor, - "SELECT scope_identity() AS lastrowid", ()) + "SELECT scope_identity() AS lastrowid", (), self) else: conn._cursor_execute(self.cursor, - "SELECT @@identity AS lastrowid", ()) + "SELECT @@identity AS lastrowid", (), self) # fetchall() ensures the cursor is consumed without closing it row = self.cursor.fetchall()[0] self._lastrowid = int(row[0]) @@ -697,8 +697,7 @@ class MSExecutionContext(default.DefaultExecutionContext): "SET IDENTITY_INSERT %s OFF" % self.dialect.identifier_preparer. format_table(self.compiled.statement.table), - () - ) + (), self) def get_lastrowid(self): return self._lastrowid |
