Again: ODBC / Win98 -> crash

Gordon McMillan gmcm at hypernet.com
Mon Jul 3 10:42:32 EDT 2000


Matthias Huening wrote: 

>Some days ago I posted a problem with ODBC on my Win98-machine. I
>thought that it could be the win32-ODBC module that caused the crash I
>reported, so I switched to Marc-Andre Lemburg's mxODBC module. To keep
>it simple I give a minimal example (where dsn is a valid dsn):
>
>>>> import ODBC.Windows
>>>> db = ODBC.Windows.Connect(dsn)
>>>> db.close()
>
>Up to here, everything is fine. No problems so far.
>But when I do it again:
>
>>>> db = ODBC.Windows.Connect(dsn)
>
>I get an immediate crash of Python.
>
>My (German) version of Win98 tells me:
>
>   PYTHONW verursachte einen Fehler durch eine ungültige Seite
>   in Modul ODBCJT32.DLL bei 015f:04c0ac36.
>
>It seems like something isn't closed properly when I do db.close().
>Any suggestions?

All this points to it being the driver. That is, your dsn gets looked up, 
and the driver for the appropriate DB is loaded. Since that's the JET 
driver (ie, the one that translates ODBC to JET), you can thank your lucky 
stars that it works at all <wink>. Access behaves very poorly through ODBC. 
If you really have to use Access, you might find ADO more satisfactory.

- Gordon



More information about the Python-list mailing list