sequential files
-
i am doing a project to enter data to a text file and save it.(a single line of data on a daily basis) this i can do, but the only problem i have is when you append the textfile the data entered goes to the next line down. how do i get it to reverse, go above the last line.
Regards Zeldacat
-
i am doing a project to enter data to a text file and save it.(a single line of data on a daily basis) this i can do, but the only problem i have is when you append the textfile the data entered goes to the next line down. how do i get it to reverse, go above the last line.
Regards Zeldacat
You can't append at the beginning of the file. You have to read all the data, add the text to the beginning of it, and write all the data. -- modified at 12:28 Saturday 7th July, 2007 When I come to think of it, why do you need the last lines at the top of the file anyway? If you want them displayed in that way, you can easily reverse the order when displaying them.
--- single minded; short sighted; long gone;
-
i am doing a project to enter data to a text file and save it.(a single line of data on a daily basis) this i can do, but the only problem i have is when you append the textfile the data entered goes to the next line down. how do i get it to reverse, go above the last line.
Regards Zeldacat
If after a couple of weeks/years/whatever you run out of buffer space to prefix the new data to existing data, then read this article.[^] :)
Luc Pattyn [My Articles] [Forum Guidelines]