|
From: Ashley G. <ash...@op...> - 2003-03-08 01:09:00
|
using code:
import Sybase
try:
s = Sybase.connect('Oscar', 'docent', 'docent')
cur = s.cursor()
cur.execute("select * from docent.DRUser where lastName = 'Glassel'")
print cur.description
for tup in cur.description:
print tup[0],
print
while 1:
rec = cur.fetchall()
if not rec: break
print rec
except NameError,e:
print 'error ', e, 'undefined'
i get this error:
Traceback (most recent call last):
File "one.py", line 11, in ?
rec = cur.fetchall()
File "/usr/lib/python2.2/site-packages/Sybase.py", line 489, in fetchall
row = self.fetchone()
File "/usr/lib/python2.2/site-packages/Sybase.py", line 413, in fetchone
_array = _fetch_rows(self._cmd, self._bufs)
File "/usr/lib/python2.2/site-packages/Sybase.py", line 199, in _fetch_rows
raise Error('ct_fetch')
Sybase.Error: ct_fetch
the description part works, why can't I print the record??
-regards
Ashley
|