Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>This has got nothing to do with DBFs at the application level.
>
>It's low-level file access with "handles".
It opens a handle to any file, including a DBF, then calls FlushFileBuffers on that file. That writes all unsaved data in that file to disk, not just data that were written via this low-level file handle. So, for example, if you just did a TABLEUPDATE() on Customers.DBF, you'd use Mr. Moody's code to open Customers.dbf with another filehandle and flush the data to disk. You'd also need to use it on Customers.FPT and Customers.CDX. Cumbersome, perhaps, but very effective.
You can also pass FlushFileBuffers a share name as shown in the sample code, and any buffered files on that share, no matter what the application, nor, I believe, who the user, will have their buffered changes written to disk.
FlushFileBuffers is a powerful function, so needs to be used wisely, otherwise you might as well turn off buffered writes on the server.
-Tom
[This post is provided AS-IS with no warranties, and confers no rights.]
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement