]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Hardcoded ident_seed and ident_increment query had bind markers noncompliant with...
authorBrad Allen <bradallen137@gmail.com>
Thu, 18 Mar 2010 17:47:45 +0000 (11:47 -0600)
committerBrad Allen <bradallen137@gmail.com>
Thu, 18 Mar 2010 17:47:45 +0000 (11:47 -0600)
lib/sqlalchemy/dialects/mssql/base.py

index 6425291c8a29d838a2f99133a140e1b5b7edeeae..e6e9a0e41b82609811696c4c5c9f85df46ab0003 100644 (file)
@@ -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({