Hi ,
The cause for your problem is that while you are updating your files , the last changes are not recorded directly to the media but transfered to a internal file buffer. After some time , the OS or the ODBC driver transfers the information to the files. If something wrong happens during this time , you loose the buffer and the updatings too. It happens no matter the language you use.
I am not a active delphi programmer but I've worked with others languages and in all cases there were a command to update the contents of internal files buffers to the media ( commit, flush). Maybe Delphi and ODBC driver ( acessed by some Delphi method) has a similar command or instruction too.
I hope it helps.