diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-02-27 00:44:26 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-02-27 00:44:26 +0000 |
commit | 46fa536ba4c2542bcac41346bb113a08ebcf342c (patch) | |
tree | 051cca9668a5d1a65c81129399fd7faffde8d2c4 /lib/sqlalchemy/connectors/pyodbc.py | |
parent | 64988b45656c8fcdf384b3ad3b6303eaff521dc1 (diff) | |
download | sqlalchemy-46fa536ba4c2542bcac41346bb113a08ebcf342c.tar.gz |
- threadlocal engine wasn't properly closing the connection
upon close() - fixed that.
- Transaction object doesn't rollback or commit if it isn't
"active", allows more accurate nesting of begin/rollback/commit.
- Added basic support for mxODBC [ticket:1710].
- Python unicode objects as binds result in the Unicode type,
not string, thus eliminating a certain class of unicode errors
on drivers that don't support unicode binds.
Diffstat (limited to 'lib/sqlalchemy/connectors/pyodbc.py')
-rw-r--r-- | lib/sqlalchemy/connectors/pyodbc.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/connectors/pyodbc.py b/lib/sqlalchemy/connectors/pyodbc.py index 30a7f98d0..46b0556d5 100644 --- a/lib/sqlalchemy/connectors/pyodbc.py +++ b/lib/sqlalchemy/connectors/pyodbc.py @@ -68,7 +68,8 @@ class PyODBCConnector(Connector): def is_disconnect(self, e): if isinstance(e, self.dbapi.ProgrammingError): - return "The cursor's connection has been closed." in str(e) or 'Attempt to use a closed connection.' in str(e) + return "The cursor's connection has been closed." in str(e) or \ + 'Attempt to use a closed connection.' in str(e) elif isinstance(e, self.dbapi.Error): return '[08S01]' in str(e) else: |