From 46fa536ba4c2542bcac41346bb113a08ebcf342c Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 27 Feb 2010 00:44:26 +0000 Subject: - 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. --- lib/sqlalchemy/connectors/pyodbc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/sqlalchemy/connectors/pyodbc.py') 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: -- cgit v1.2.1