Simple Line Input question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cbbibleboy
    New Member
    • Apr 2007
    • 29

    Simple Line Input question

    Howdy!
    I'm importing a large file (213 MB) and parsing it. My question is: does the VB6 Line Input read the whole file, then select out each line, or actually only read that line. I thought it was the second case, but when I'm reading this file, it stalls like no other. A similar smaller file works, but I'm not sure that it should make any difference. (And STD_PROCESSES.G en_Rec.Record_T ype is just a fixed length string*1000)

    Code:
    Line Input #gInFile.hFile, STD_PROCESSES.Gen_Rec.Record_Type
  • taylorjpt
    New Member
    • Jun 2007
    • 4

    #2
    Line input reads until the first [cr][lf] sequence is encountered and then returns the string from the starting point up to but not including the [cr][lf]. This works great for text files done with notepad, but not so much with other files such as a word document where data is not on separate lines.

    If your file is not broken into 'lines' with [cr][lf] sequences such as raw binary data, you will simply get a string as big as the first random [cr][lf] location.

    Note that data pulled out of a file this way actually drops the [cr][lf] so the data read will always be less that the size of the file.

    jt

    Comment

    Working...