On Nov 26, 8:38 am, BostonNole <bostonn...@gmail.comwrote:
I need to run some validation rules, formatting rules and business
rules against the data, then dump it out to another text file.
With the size of file your talking about, moving it all into memory is
probably not going to be a good option - and that is exactly what your
talking about by loading it into a DataTable.
So, the question becomes - do your validation rules depend on data
from other records in the file, or can each record be treated
individually? Because if they can be treated individually, then I
would consider reading the groups of records (you said it was fixed
width file), processing them, and writing them out to the new file,
repeat until finished. Most likely, the slow part of this is going to
be your reads and writes... So, by reading and writting them in
chunks (say building your output record in a stringbuilder) you can
minimize the number of disk hits.
--
Tom Shelton