(no subject)

Ashley Glassel <[email protected]>
Newsgroups gmane.comp.python.sybase
Message-ID <20030307152513.A19694@the-gate>
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
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.