Question on TDataset best practices




I am working on a program that needs to fetch records from a database,
and then needs to process each of those records in turn. I am torn on
how best to do this.

My current thinking is to separate fetching and processing like so:

1 - Call a function that fetches records and returns a dataset.
2 - Call one or more procedures to process dataset records,
passing the dataset as a const parameter each time.

Or, is it better to do the processing as records are being fetched?

Right now, the 'processing' is thinly specified, but will probably
involve several other table lookups, and several steps per record,
before eventually writing each record to one or more tables.


Thanks,
Mark Edwards
.



Relevant Pages

  • Re: NULL value question
    ... I can fetch records from the database ... bar FROM baz WHERE foo IS NOT NULL ... Web Hosting by West Virginians, ...
    (comp.lang.perl.misc)
  • RE: Exceptions in CRecordset
    ... I don't think I could offer a solution to this, it will really take stepping ... If each thread needs to connect to the database it seems like a backward ... > and fetch records and then I use the fetched records to insert into another ... I am getting exceptions with almost every ...
    (microsoft.public.sqlserver.programming)
  • Intermittent work in UI thread
    ... I'm trying to create a UI thread to do constant background work, but I'm having some design problems. ... The thread needs to fetch records from a database. ...
    (microsoft.public.vc.mfc)
  • NULL value question
    ... database and DBI. ... I can fetch records from the database ... with no problem, but I'm having trouble ...
    (comp.lang.perl.misc)

Loading