Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Flush = .T.
Message
From
02/09/2008 19:31:45
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01343699
Message ID:
01344347
Views:
15
>Hilmar
>
>I ask whether "flush force" is better than "flush"
>
>
>Moises

Well, yes, apparently.

The help says that this clause calls the Windows FlushFileBuffers API. The help for this API - obtained from http://msdn.microsoft.com/en-us/library/aa364439.aspx - says:

"Typically the WriteFile and WriteFileEx functions write data to an internal buffer that the operating system writes to a disk on a regular basis. The FlushFileBuffers function writes to a disk all the buffered information for a specified file."

So, as I understand it, it seems that data "written to disk" is really stored in Windows buffers for a while. If the power goes down soon after "writing" the data, you are in trouble. Well, your user's data, anyway.

I understand there separate buffers, 1. for the OS, 2. for the hard disk. The hard disk buffer (write cache) must be disabled separately.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform