mxODBC problems

Sean Davis seandavi at gmail.com
Tue Jan 9 08:49:32 EST 2007


I have just installed mxODBC on my x86_64 suse linux machine, where I
use unixODBC for connection.  Running queries from isql or DataManager
works fine for the DSN that I am using.  However, under mxODBC, I can
get a connection object and a cursor object, but all attempts to
execute even the simplest selects result in empty resultsets.  Any
ideas on what might be wrong?

>>> from mx.ODBC.unixODBC import *
>>> con = connect('Postgresql',user='username',password='passwd')
>>> cur = con.cursor()
>>> cur.execute('SELECT * FROM g_rif')
>>> rs = cur.execute('SELECT * FROM g_rif')
>>> rs
>>> cur.execute('SELECT * FROM g_rif').fetchall()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'fetchall'

Thanks,
Sean




More information about the Python-list mailing list