[pywin32-bugs] [ pywin32-Patches-1706430 ] Access violation in odbc when DB is down
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2007-04-24 10:02:02
|
Patches item #1706430, was opened at 2007-04-24 12:01 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=1706430&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Michael Foetsch (foetsch) Assigned to: Nobody/Anonymous (nobody) Summary: Access violation in odbc when DB is down Initial Comment: When a DB connection is opened using "odbc.odbc()", and the connection object is reused for several queries (which it usually is), an access violation might occur. To reproduce: * Open a connection * Execute an SQL query * Shut down the SQL database service * Execute another SQL query using the same connection object * A Python exception occurs, which is expected * When the DB cursor is garbage collected (or when you invoke "close()" on it explicitly), Python crashes with an access violation within the ODBC DLL (I tried using Win XP and SQL Server 2005) In the patch, the access violation is caught using a __try/__except. This also allows "attemptReconnect()" to do its magic when the SQL service goes back up. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=1706430&group_id=78018 |