diff options
author | Paul Johnston <paj@pajhome.org.uk> | 2007-08-08 20:45:25 +0000 |
---|---|---|
committer | Paul Johnston <paj@pajhome.org.uk> | 2007-08-08 20:45:25 +0000 |
commit | 06bebbb41c6ec0ba98467de575835dea0ade6e51 (patch) | |
tree | 1af96c987a67c76f9baabf833ef9ceae95aefb71 /lib/sqlalchemy | |
parent | 7524ea9dd6d7a11d70a0d26b84fd0e4ca1e9c77f (diff) | |
download | sqlalchemy-06bebbb41c6ec0ba98467de575835dea0ade6e51.tar.gz |
merge [3215] into trunk
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r-- | lib/sqlalchemy/databases/mssql.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/sqlalchemy/databases/mssql.py b/lib/sqlalchemy/databases/mssql.py index 9e00f2caa..5faaf31bf 100644 --- a/lib/sqlalchemy/databases/mssql.py +++ b/lib/sqlalchemy/databases/mssql.py @@ -709,6 +709,15 @@ class MSSQLDialect_pymssql(MSSQLDialect): class MSSQLDialect_pyodbc(MSSQLDialect): + def __init__(self, **params): + super(MSSQLDialect_pyodbc, self).__init__(**params) + # whether use_scope_identity will work depends on the version of pyodbc + try: + import pyodbc + self.use_scope_identity = hasattr(pyodbc.Cursor, 'nextset') + except: + pass + def import_dbapi(cls): import pyodbc as module return module |