|
From: Phil E. <ph...@li...> - 2007-11-09 10:09:37
|
Hi All:
I've built and installed python-sybase v0.38 on a freshly installed
CentOs5 machine and I have a couple of issues I;d appreciate some
feedback on:
1. Due to CentOS installing the FreeTDS header files in a slightly odd
location, I had to modify the setup.py script in order for the build_ext
process to work. It would probably be helpful to submit the changes to
the developers, so should I post my modifications here or direct to the
dev team?
2. I have a very simple-minded test script which reads a single row of
data out of our customer database:
db = Sybase.connect(DBNAME, DBUSER, DBPASS)
con = db.cursor()
con.execute("qGetDomain @Domain='linux2000.com'")
result = con.fetchall()
for line in result: print str(line)
This code throws an exception on the call to fetchall(). The error text
doesn't seem to give any useful information:
File "./crmtest.py", line 27, in ?
result = con.fetchall()
File "/usr/lib/python2.4/site-packages/Sybase.py", line 831, in fetchall
return self._fetcher.fetchall()
File "/usr/lib/python2.4/site-packages/Sybase.py", line 605, in fetchall
row = self.fetchone()
File "/usr/lib/python2.4/site-packages/Sybase.py", line 555, in fetchone
self._fetch_rowcount()
File "/usr/lib/python2.4/site-packages/Sybase.py", line 682, in
_fetch_rowcount
self._raise_error(Error, 'ct_results')
File "/usr/lib/python2.4/site-packages/Sybase.py", line 519, in
_raise_error
raise exc(text)
Sybase.Error: ct_results
Oddly, a call to fetchone() works as expected. Is there any reason why
calling fetchall() with only a single row in the result set should fail
like this?
--
Regards
Phil Edwards
Brighton, UK
|