Installing ODBC on PythonWin
zessin at my-deja.com
Sat Jun 19 11:10:45 EDT 1999
In article <7ke9kq$3c2$1 at holly.csv.warwick.ac.uk>,
esuzm at primrose.csv.warwick.ac.uk (Andrew Clover) wrote:
> eeghead84 at yahoo.com wrote:
> > It is written that the ODBC module is included in the pythonwin
> > distribution but >>>import ODBC says otherwise. I've d/e'd
> > (downloaded/executed) Win32, but it died and said that it was
> > looking for version 1.4!
> If you download the latest Python and Win32 from
> http://www.python.org/download/download_windows.html it should be
> fine. You'll want to write "import dbi, odbc" though.
> Now for my problems.
> I've got an Access database accessed by Python scripts under CGI.
> However, sometimes, calls to odbc.odbc(dsn) hang up and never return.
> (Eventually the web server times out and kills the process.) This
> seems to happen randomly, but increasingly. Does anyone have any
> idea why? A fault with the odbc module, or Access, or what?
Oh, that is interesting. I had a similar problem with the driver
to a remote Navision database and was suspecting it was limited
to that configuration - I do not use ODBC very much.
Inserting a delay after the import seemed to "fix" my problem:
import dbi, odbc
odbc_nav = odbc.odbc (dsn_nav)
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
More information about the Python-list