Reading Lines from a File that is in Memory

  • Thread starter Thread starter jcrouse
  • Start date Start date
J

jcrouse

OK, based on someones ssuggestion in an earlier post I have some code
that reads a text file into memory. This is the code:

Dim FileNum As Integer
Dim TotalFile As String

Open FileName For Binary As #1
TotalFile = Space(LOF(1))
Get #1, , TotalFile

Now the data is all in my variable, TotalFile. The data is structured I
know exactly which piece was pulled in from excatly which line in the
original text file so I don't need to do any seraching or string
manipulation, I simply want to read the file in memory a line at a
time. Is this possible in the format in which I have it stored? If so,
how? If now can I accomplish this some other way?

Thanks,
John
 
Hello jcrouse,

Uhh.. this is a vb.net group. You'll want to try the vb6 group/s.

In .net you would create a Filestream, attach a streamreader, and call streamreader.readline.

-Boo
 
Back
Top