[DB-SIG] There is a better way

Keating, Tim TKeating@origin.ea.com
Wed, 12 Jun 2002 10:44:10 -0500


And on Oracle, cr.description is not defined for ref cursors.

> -----Original Message-----
> From: Stuart Bishop [mailto:zen@shangri-la.dropbear.id.au]
> Sent: Wednesday, June 12, 2002 1:22 AM
> To: r.taylor@eris.qinetiq.com
> Cc: db-sig@python.org
> Subject: Re: [DB-SIG] There is a better way
> 
> 
> 
> On Friday, June 7, 2002, at 08:34 PM, Richard Taylor wrote:
> 
> >         if cr.description == None or cr.rowcount == 0 :
> >             return []
> >
> >         try:
> >             res = cr.fetchall()
> 
> 
> > I would welcome comments on whether this will work on all DB API 
> > modules.
> 
> Unfortunatly, rowcount may be undefined until all results have been
> retrieved (otherwise the DB may have to execute some massive query 
> twice -
> once to determine the rowcount and once to actually retrieve 
> the rows -
> in cases where the result cannot be cached in memory).
> 
> --
> Stuart Bishop <zen@shangri-la.dropbear.id.au>
> http://shangri-la.dropbear.id.au/
> 
> 
> 
> _______________________________________________
> DB-SIG maillist  -  DB-SIG@python.org
> http://mail.python.org/mailman/listinfo/db-sig
>