By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,694 Members | 1,325 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,694 IT Pros & Developers. It's quick & easy.

Sequential file access and binary file access

P: n/a
kd
Hi All,

I have a .txt file, whose contents need to be read and processed. Which
among the following is the best way to do it?

- Using Sequential file access functions (FileOpen, LineInput, etc)
- Using binary file access functions (File.Open, FileGet, etc)

Thanks,
kd
Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
KD,

For me the best choise is not between them, that is the Streamreader, the
speed of a file on disk is never faster than that the disk, which is always
slower than your program, so for performance you should not look for this.

http://msdn.microsoft.com/library/de...classtopic.asp

I hope this helps,

Cor
Nov 21 '05 #2

P: n/a
kd
Hi Cor,

When should one use sequential file access and when to use binary acess to
read .txt files?

Thanks,
kd

"Cor Ligthert" wrote:
KD,

For me the best choise is not between them, that is the Streamreader, the
speed of a file on disk is never faster than that the disk, which is always
slower than your program, so for performance you should not look for this.

http://msdn.microsoft.com/library/de...classtopic.asp

I hope this helps,

Cor

Nov 21 '05 #3

P: n/a
KD,

When all characters(bytes) are readable as txt file, you should in my
opinion never use the binary access.

However just my thought, I never tried it because I even don't think about
another way.

Cor
Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.