cursor.execute fails under mxODBC

Brett Haydon bbhaydon at bigpond.com
Sat Mar 10 11:17:09 EST 2001


Hmmm looks like the new version is broken.

I am running mxODBC 1.1.1 no problems with both MySQL and Access
for the last 6 months on W2k.

I just tried the new version also with exactly the same problems.

The old one still works fine though..

regards,

bbhaydon
"Louis Luangkesorn" <lluang at northwestern.edu> wrote in message
news:3AA7FF0E.50E6D70F at northwestern.edu...
> I have the same problem.  Below is my output.  I will first use the odbc
> that comes included with ActivePython, then the mxODBC module  (by the
way,
> I've tried to rename the odbc.pyc file, that did not help, except break
> odbc)
>
> PythonWin 2.0 (#8, Oct 19 2000, 11:30:05) [MSC 32 bit (Intel)] on win32.
> Portions Copyright 1994-2000 Mark Hammond (MarkH at ActiveState.com) - see
> 'Help/About PythonWin' for further copyright information.
> >>>
> >>> import dbi,odbc
> >>> import pprint
> >>> channel = odbc.odbc('sqltutor')
> >>> ch1 = channel.cursor()
> >>> ch1.execute('SELECT FirstName, LastName, Address, City, State FROM
> EmployeeAddressTable')
> 0
> >>> test1 = ch1.fetchall()
> >>> pprint.pprint(test1)
> [('Joe', 'Smith', '83 First Street', 'Howard', 'Ohio'),
>  ('Mary', 'Scott ', '842 Vine Ave.', 'Losantiville', 'Ohio '),
>  ('Sam', 'Jones ', '33 Elm St.', 'Paris', 'New York '),
>  ('Sarah', 'Ackerman ', '440 U.S. 110', 'Upton', 'Michigan ')]
> >>> ch1.close()
> >>> channel.close()
> >>> import mx.ODBC
> >>> channel = mx.ODBC.Windows.connect('sqltutor')
> >>> ch1 = channel.cursor()
> >>> ch1.execute('SELECT FirstName, LastName, Address, City, State FROM
> EmployeeAddressTable')
>
> at this point the whole thing dies.  No error messages.  I didn't see any
> log files anywhere either.
>
> Louis
>
> --
> K Louis Luangkesorn
> lluang at northwestern.edu  http://pubweb.nwu.edu/~kll560  PGP:0xF3E2D362
> Whatsoever things are true, ... honest, ... just, ... pure, ... lovely,
...
> of good report; if there be any virtue, and if there be any praise, think
on
> these things.- motto - Northwestern University
>
>





More information about the Python-list mailing list