[pywin32-bugs] [ pywin32-Bugs-833280 ] PythonWin.exe crashes after ODBC driver error.
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2003-10-30 23:30:51
|
Bugs item #833280, was opened at 2003-10-30 14:43 Message generated for change (Comment added) made by rupole You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=833280&group_id=78018 Category: pythonwin Group: None Status: Open Resolution: None Priority: 5 Submitted By: David Mischo (mischod) Assigned to: Nobody/Anonymous (nobody) Summary: PythonWin.exe crashes after ODBC driver error. Initial Comment: PythonWin.exe crashes after ODBC driver error. Windows Professional XP; Python 2.3.2.1; Win32All-159 for 2.3 Occurs after getting a reported ODBC driver error finding a table name and I then either re-running script or exit Pythonwin. Happens against either Excel and CSV ODBC sources. In the Excel example, the table name error was because the select statement needed to put the table name in quotes because it referenced a multi-tabbed system table with a $. Select * from Payments needed to be Select * from Payments$. import dbi, odbc try: s = odbc.odbc('AdvWorksExcel') cur = s.cursor() cur.execute('select ProductName from Payments') print cur.description for tup in cur.description: print tup[0], print while 1: rec = cur.fetchmany(10) if not rec: break print rec except NameError,e: print 'error ', e, 'undefined' Traceback (most recent call last): File "C:\PROGRA~1\Python\lib\site- packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Documents and Settings\DW\Script3.py", line 6, in ? cur.execute('select ProductName from Payments') dbi.program-error: [Microsoft][ODBC Excel Driver] The Microsoft Jet database engine could not find the object 'Payments'. Make sure the object exists and that you spell its name and the path name correctly. in EXEC >>> Exit PythonWin or Re-Run Script again produces: Unhandled exception in Pythonwin.exe (ODBC.PYD): 0xC0000005: Access Violation ---------------------------------------------------------------------- >Comment By: Roger Upole (rupole) Date: 2003-10-30 18:30 Message: Logged In: YES user_id=771074 This is fixed in build 160 and greater. Roger ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=833280&group_id=78018 |