Re: Working with recordsets

From: AdSR (adsr_at_poczta.onet.pl)
Date: 01/07/05


Date: Fri, 07 Jan 2005 19:58:08 +0100

chema.rey@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



Relevant Pages

  • Re: Update fields in previous row from fields in current row
    ... I don't think i can "pull the data in one line at a time". ... The data is in a csv file and imported into a recordset. ... in the first UDT. ...
    (microsoft.public.vb.database.ado)
  • Re: Data throughput
    ... The query is used to fill a CSV file that a third party ... >SQL Server MVP ... >> a recordset being returned to the application. ...
    (microsoft.public.sqlserver.odbc)
  • Re: Import comma delimited file
    ... Excel file can be converted into) in good form just as you can to a ... The .csv file needs to be uploaded to the server. ... So I'd suggest going through this recordset one row at a time and within ... ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool... ...
    (microsoft.public.inetserver.asp.db)
  • Working with recordsets
    ... I have one recorset that I would like to pass to 2 functions, ... for create an CSV file and the other one is to create a HTML file. ... and then when I pass it to the second funtion the recordset is in the ... like movefirst() method. ...
    (comp.lang.python)
  • Re: Working with recordsets
    ... AdSR wrote: ... >> for create an CSV file and the other one is to create a HTML file. ... >> and then when I pass it to the second funtion the recordset is in the ... Or, if this doesn't suit, try creating two separate cursors from the ...
    (comp.lang.python)