Writing to a text file

sjn78

Well-known member
Joined
May 4, 2003
Messages
255
Location
Australia
Can you write to a text file at a specific location?

I am witing an app that stores all of the data in a singular text file. And no, I cannot use databases as I need the program to not be dependant on 3rd party software eg, Access or SQL.

The user may change a record that resides on line 100. Now, can I read in the file, get the line number for that record, then output the new change to that specific line?

I started out using an array to store each line, but looking ahead, the text file may become very large.

Thanks for any help.
 
I think the array would be your best choice if you are using sequential files. If the lines were all of the same length, then you could use a Binary reader instead.
And, if you are using arrays, the user can change as many records as they want at a time. :)
 
Back
Top