Click to See Complete Forum and Search --> : rewind(stream) without overwriting data


elimin8tor
January 26th, 2003, 04:47 AM
I'm fighting streams, I write something to the end of my file and if I then rewind the stream and write something, instead of inserting the data there, it just writes over the old data in that position. Is there a way I can change this behaviour?
Thx

Saurabh Gupta
January 26th, 2003, 05:36 AM
Hi,
You can not add or delete any record in between a file.
Better way write the above portion in to a temp file add your that
record, again write the rest of your file in the temp file. Delet the original file rename that temp file to original file name.