Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21845

Reading a text file with LINE INPUT.. reading whole file?

$
0
0
I commonly use LINE INPUT with DO/UNTIL loops to parse files. I need to parse a handful of 2GB files (Essbase database exports), but when I try to input a single line to a string variable, it never completes. I eventually have to kill the process using task manager. I noticed that memory usage continues to increase, it looks like the entire file is being read in to the variable instead of one line. I assume this is occurring because the export doesn't use an end-of-line character that is recognized by LINE INPUT.

I looked at a smaller file sample using text editors, and the lines, around 80 chars long each, break as expected. NotePad++ puts a "LF" symbol at the end of each line, and UltraEdit puts a paragraph symbol at the end of each line.

Any ideas how to read these files?

Viewing all articles
Browse latest Browse all 21845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>