Installing ODBC on PythonWin

Bill Tutt billtut at microsoft.com
Tue Jun 15 01:22:31 EDT 1999


After installing the Python interpreter, and the Win32 extensions. 
(They're available at: http://www.python.org/download/download_windows.html)

Check out:
http://www.python.org/windows/OdbcHints.html

For hints on using ODBC with Python on Windows.

The answer to your question is that inorder to import the odbc module, you
need to import the dbi module first.
e.g.:
import dbi
import odbc

conn = odbc.odbc('DSNname')
cursor = conn.cursor()
cursor.execute('select * from EndUser')
....


Bill




More information about the Python-list mailing list