Board index » delphi » D5-Loss of posted records if computer reset/crashes

D5-Loss of posted records if computer reset/crashes

I am using Paradox tables under Delphi 5.   After having posted a new or
edited record, I need them to be written to the underlying table files
immediately.   I am using the TTable component with most of the default
properties.

I have found that if my program is still running when the computer is reset
(or a laptop's batteries die, or the computer crashes etc) the posted record
is not there the next time that the program is run.

My current fix for this problem is to immediately close the table, and then
re-open it again.   Is this Window write-caching, or is there some other way
that I can get a neat, immediate file update, so that the data is safe?

Andrew Spencer

 

Re:D5-Loss of posted records if computer reset/crashes


In the after post event call TTable.Flushbuffers that will force the data to disk.
also Set Local Share to True in the BDE setup.

Best Regards Will.

Other Threads