(forw) fetchall() error

Ashley Glassel <[email protected]>
Newsgroups gmane.comp.python.sybase
Message-ID <20030307152741.A19719@the-gate>
my apologies, for the lack of title in the last message.

----- Forwarded message from Ashley Glassel <[email protected]> -----

Date: Fri, 7 Mar 2003 15:25:13 +1100
From: Ashley Glassel <[email protected]>
To: python-sybase <[email protected]>
Organisation: Poor
User-Agent: Mutt/1.2.5.1i


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 

----- End forwarded message -----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.