diff options
Diffstat (limited to 'lib/sqlalchemy')
| -rw-r--r-- | lib/sqlalchemy/dialects/mssql/base.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/sqlalchemy/dialects/mssql/base.py b/lib/sqlalchemy/dialects/mssql/base.py index 6425291c8..e6e9a0e41 100644 --- a/lib/sqlalchemy/dialects/mssql/base.py +++ b/lib/sqlalchemy/dialects/mssql/base.py @@ -1326,12 +1326,10 @@ class MSDialect(default.DefaultDialect): if ic is not None and self.server_version_info >= MS_2005_VERSION: table_fullname = "%s.%s" % (current_schema, tablename) cursor = connection.execute( - sql.text("select ident_seed(:tname), ident_incr(:tname)", - bindparams=[ - sql.bindparam('tname', table_fullname) - ] + "select ident_seed('%s'), ident_incr('%s')" + % (tablename, tablename) ) - ) + row = cursor.first() if not row is None: colmap[ic]['sequence'].update({ |
