[python-sybase] (forw) fetchall() error
Marcos Sánchez Provencio
msanchez at grupoburke.com
07 Mar 2003 09:31:52 +0100
--=-eNOn1BP4dHi7+ebICv8G
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: quoted-printable
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=F3:
>=20
> using code:
>=20
> import Sybase
> try:
> s =3D Sybase.connect('Oscar', 'docent', 'docent')
> cur =3D s.cursor()
> cur.execute("select * from docent.DRUser where lastName =3D 'Glas=
sel'")
> print cur.description
> for tup in cur.description:
> print tup[0],
> print
> while 1:
> rec =3D cur.fetchall()
> if not rec: break
> print rec
> except NameError,e:
> print 'error ', e, 'undefined'
>=20
>=20
> i get this error:
>=20
> Traceback (most recent call last):
> File "one.py", line 11, in ?
> rec =3D cur.fetchall()
> File "/usr/lib/python2.2/site-packages/Sybase.py", line 489, in fetchal=
l
> row =3D self.fetchone()
> File "/usr/lib/python2.2/site-packages/Sybase.py", line 413, in fetchon=
e
> _array =3D _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
>=20
>=20
> the description part works, why can't I print the record??
>=20
> -regards
>=20
> Ashley=20
>=20
> ----- End forwarded message -----
> _______________________________________________
> Python-sybase mailing list
> Python-sybase@object-craft.com.au
> https://object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase
--=20
gpg --recv-keys --keyserver wwwkeys.pgp.net B9AD9B1B
--=-eNOn1BP4dHi7+ebICv8G
Content-Type: application/pgp-signature; name=signature.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQA+aFj2TwXdxLmtmxsRApTJAJ0Y4VSy/5sS5DDJ2QTpyyNCWveajACZAYdl
7fDty0Y/bVPa9qlJKV81ADY=
=jTr7
-----END PGP SIGNATURE-----
--=-eNOn1BP4dHi7+ebICv8G--