ODBC

j vickroy jvickroy at sec.noaa.gov
Thu Jun 29 10:33:10 EDT 2000


I have not seen this behavior when repeatedly accessing an SQL Server
database using Python 1.5.2 on a Win NT 4 platform.

What happens if you repeatedly open and close the database **without
executing any other statements** between successive "opens" ?


Matthias Huening wrote:

> Hi,
>
> I use the ODBC module that comes with Marc Hammond's winall.
> Everything works fine; I open a connection, do something, close the
> connection, like this:
>
> import odbc
>
> conn = odbc.odbc(DSN)
> cur = conn.cursor()
> sql = "SELECT col FROM table"
> cur.execute(sql)
> x = cur.fetchall()
> cur.close()
> conn.close()
>
> The problem: when I try to open another connection in the same script
> (after I closed the first one), Python crashes. Any ideas?
>
> Matthias
>
> --
> matthias.huening at univie.ac.at
> http://www.ned.univie.ac.at/dt/




More information about the Python-list mailing list