FAQ

chema.rey at gmail.com wrote:
Hi.

I have one recorset that I would like to pass to 2 functions, one is
for create an CSV file and the other one is to create a HTML file. The
problem is that the recordset is totally read in the first function,
and then when I pass it to the second funtion the recordset is in the
last record.

I've read docs, but I think that one cursor doesn't have something
like movefirst() method. Anybody have an idea to solve this?

Thank's.
Try loading the whole recordset with the fetchall() method and use the
resulting sequence in your functions. It won't be memory-efficient but
it will be easy to do.

AdSR

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 3 | next ›
Discussion Overview
grouppython-list @
categoriespython
postedJan 7, '05 at 5:44p
activeJan 8, '05 at 7:22p
posts3
users3
websitepython.org

3 users in discussion

Chema Rey: 1 post Steve Holden: 1 post AdSR: 1 post

People

Translate

site design / logo © 2022 Grokbase