I have data stored in an ascii file. It is divided up into variable lenght records and fields. What is the best method of adding data to an existing field? Should I create a new file, write the top data, new data, and the bottom data. What are common methods of handling this situation?

I will be using File mapping to view, then close the mapping to do any updates. Currently the file size is 80kB, but will grow 250% each year. So in 2010, it'll be 750MB. But I plan on changing the way the data is stored, implement compresion (that'll be a nightmare), and the growth should slow down over time.

Thanks,
Mike
Posted on 2001-08-20 03:03:01 by eet_1024
If your expecting many changes it might be better to write a pointer to the old location, and just store the new data at the end of the file. Then have an optimize database option that organizes the database - eliminating the extra space and pointers.
Posted on 2001-08-20 07:55:06 by bitRAKE
This might not be what you want, but why not use Microsoft's own text ODBC driver ?
It comes with the office package and lets you treat a .txt as a database file.
Or maybe you could study it to learn how it works.
My two centavos :P

Latigo
Posted on 2001-08-20 11:02:51 by latigo