Re: (forw) fetchall() error

Marcos Sánchez Provencio <[email protected]>
Newsgroups gmane.comp.python.sybase
Organization www.burke.es
Message-ID <[email protected]>
You may try using an explicit set of columns instead of * to see if it
is one in particular that causes this error.

El vie, 07 de 03 de 2003 a las 05:27, Ashley Glassel escribió:

> 
> 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 -----
> _______________________________________________
> Python-sybase mailing list
> [email protected]
> https://object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase
-- 
gpg --recv-keys --keyserver wwwkeys.pgp.net B9AD9B1B
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQA+aFj2TwXdxLmtmxsRApTJAJ0Y4VSy/5sS5DDJ2QTpyyNCWveajACZAYdl
7fDty0Y/bVPa9qlJKV81ADY=
=jTr7
-----END PGP SIGNATURE-----
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.