Using MyODBC with Python

Joseph A Knapka jknapka at earthlink.net
Wed May 1 17:47:38 EDT 2002


Steve Holden wrote:

> that). You could use the one that comes with the Win32 extensions, but I
> would recommend Marc-Andre Lemburg's mxODBC, which you will find at
> 
>     http://www.egenix.com/files/python/
> 
> Note that a license is required for commercial use. This allows you to say
> stuff like:
> 
>     import mx.ODBC as odbc
>     conn = odbc.connect("SystemDSNName")
>     curs = conn.cursor()
>     curs.execute("SELECT * FROM tablename")
>     data = curs.fetchall()

Unless I am confused, it appears that the win32
extensions (as included with ActivePython) allow
this as well (exactly the same code, except for the
package name). Is there any particular reason you
recommend wxODBC over the win32 odbc module?

Thanks,

-- Joe
    Any OS distinguishable from Windows is not sufficiently broken.



More information about the Python-list mailing list