|
From: <sa...@us...> - 2007-11-09 18:02:12
|
Hi Phil,
You can post your patch here.
Concerning your problem, I think it is a known bug when calling a stored
procedure with execute.
Could you try con.callproc("qGetDomain @Domain='linux2000.com'") instead
of con.execute?
If it works, then the problem is probably corrected in trunk. I have an
alpha version of python-sybase 0.39 on its way with many changes, but I
still need to finish a few things before to release it.
regards
--
Sébastien Sablé
Phil Edwards a écrit :
> 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?
>
|