[DB-SIG] There is a better way
Wed, 12 Jun 2002 10:34:36 +0100
-----BEGIN PGP SIGNED MESSAGE-----
On Wednesday 12 June 2002 10:22 am, M.-A. Lemburg wrote:
> Richard Taylor wrote:
> > i.e.
> > if cr.description == None or cr.rowcount == 0 :
> > return 
> Don't know why you test .description here. cr.rowcount should suffice.
The reason for checking .description is that I want to be sure that an
exception raised from fetchXXX is because an error has occurred rather than
no rows to return. And I want this to be the case regardless of the type of
query that has been passed to execute(). The check of .description (I think)
is the only way to be sure that a 'select' type query has been passed to
The background to this is in the "[DB-SIG] Is there a better way of doing
this?" thread from last week.
B105 Woodward Building
St. Andrews Road
Worcs WR14 3PS
The Information contained in this E-Mail and any subsequent correspondence
is private and is intended solely for the intended recipient(s).
For those other than the recipient any disclosure, copying, distribution,
or any action taken or omitted to be taken in reliance on such information is
prohibited and may be unlawful.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
-----END PGP SIGNATURE-----