>>>>Hi,
>>>>Why last few records (newly added before ssytem crash) still could be lost even I have FLUSH after END TRANSACTION in every transaction?
>>>>
>>>>Thank you
>>>
>>>I believe one possibility is that the OS has a write-cache enabled. I am not sure whether in this case a FLUSH would force a write.
>>
>>Have a look at MSKB #
Q281281. It provides some interesting information on the operation of FLUSH vis-a-vis the OS.
>
>Thanks.
>
>Hmmm... "they cache the FLUSH commands and then return operation to the application" seems dangerous to me.
Yes. It does also say (those OSes) "...continue to issue FLUSH commands in the background.".
Nevertheless, I would like to see two additional things for VFP, and I will be writing a Wish List entry for them:
1) An option on the FLUSH command to stipulate that the OS is to CONFIRM FLUSH SUCCESS before returning control to VFP;
2) Improved discussion of the FLUSH command in the VFP Command Reference section of the documentation. It has has only a word or two changed since VFP 2.5 (at least) and the advent of buffering, datasessions, differing handling by different OSes, etc. needs to be described in detail.
cheers