mxODBC import problems

maxm maxm at normik.dk
Wed Mar 8 07:24:54 EST 2000


I have just installed mxODBC on my NT machine by putting the odbc directory
into  "c:\program files\python\Lib\"

I installed mxDateTime the same way and the testprogram ran nicely.

But when running:

###########
import ODBC.Windows
db = odbc.Windows.Connect('Newbiz')
c = db.cursor()
c.execute('select * from kontaktpersoner')
ODBC.print_resultset(c)
c.close()
db.close()
###########

I get the traceback:

>>>
Traceback (innermost last):
  File "<string>", line 1, in ?
  File "C:\Program Files\Python\maxm\mxODBCTEst.py", line 1, in ?
    import ODBC.Windows
NameError: Case mismatch for module name ODBC
(filename C:\Program Files\Python\win32\odbc.pyd)

##########################

Then I change the first line from:

import ODBC.Windows
to:
import odbc.Windows

and get the traceback:

>>>
Traceback (innermost last):
  File "<string>", line 1, in ?
  File "C:\Program Files\Python\maxm\mxODBCTEst.py", line 1, in ?
    import odbc.Windows
ImportError: No module named Windows

########

Then I try to rename the first line like:
import odbc.windows OR
import odbc.WINDOWS OR
import odbc.Windows

But no luck

#########

I guess my problem is that NT renames my ODBC directory to Odbc. A NT
feature i guess :-(

Has anybody got a clue??


Max M

------------------------------------------------------------------------
Max M Rasmussen,   New Media Director    http://www.normik.dk   Denmark
e-mail  mailto:maxm at normik.dk    private mailto:maxmcorp at worldonline.dk






More information about the Python-list mailing list