I need help

How do you delete data from a .dat file?
I can add,update,view,search but deletion is a big problem.
Please help.

thanks,

Abhijay
It really depends on what you mean by delete, which I suppose depends on what layout your program expects the dat file to have.

If you have to remove a chunk of it, such that afterwards the file is smaller (i.e. not just writing over a piece with some kind of NULL_DATA value) then you have to make a complete copy of the file, leaving out the bit you don't want, and then delete the original and rename the copy.

Topic archived. No new replies allowed.