Home All Groups Group Topic Archive Search About

How to read large text file ?

Author
15 Aug 2006 3:45 PM
elena
Hi, All
I have text file ASCII with record length of 388 bytes, no record delimeter
and size of the file is 562477780 bytes and 1449685 records all togeter.
How can i read such file record by record ?

Please, help

Author
15 Aug 2006 4:58 PM
Michael Nemtsev
Hello elena,

What's the reason for cross-posts?

BTW, see the Vadim's reply in csharp group

e> Hi, All
e> I have text file ASCII with record length of 388 bytes, no record
e> delimeter
e> and size of the file is 562477780 bytes and 1449685 records all
e> togeter.
e> How can i read such file record by record ?
e> Please, help
e>
---
WBR,
Michael  Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Author
15 Aug 2006 5:01 PM
Troy
Hi Elena,

If you look at MSDN library for the "FileStream.Read Method" there is an
example you can use directly. Set nBytes to your record size and surround the
"fs.Read(....)" in a while loop that continues until all bytes a read.

Cheers

Show quote
"elena" wrote:

> Hi, All
> I have text file ASCII with record length of 388 bytes, no record delimeter
> and size of the file is 562477780 bytes and 1449685 records all togeter.
> How can i read such file record by record ?
>
> Please, help

AddThis Social Bookmark Button