Using the FLUSH Command in FoxBASE+ or FoxPro

Last reviewed: July 5, 1995
Article ID: Q88892
The information in this article applies to:
  • Microsoft FoxBASE+ for MS-DOS, versions 1.21 and 2.1
  • Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, 2.5a, 2.5b, 2.6, 2.6a
  • Microsoft FoxPro for Windows, versions 2.5, 2.5a, 2.5b, 2.6, 2.6a

The FLUSH command flushes all active buffers to disk without forcing the user to close all open files. The FLUSH command copies all changes that have been made to the database into the file on disk. The FLUSH command has the same effect as closing the database and immediately reopening it. The FLUSH command should not be required in a multiuser environment.

FLUSH ensures that modifications made to databases and their indexes are stored on disk. Modifications for all open databases and indexes are saved.

FoxPro automatically saves changes to disk under any of the following circumstances:

  • A database file is closed by using the CLOSE command. Only information for the file or files being closed is flushed to disk.
  • A record or file is unlocked. Only information for the record or file being unlocked is flushed to disk.


Additional reference words: 1.21 2.10 2.00 2.50 2.50a 2.50b 2.60 2.60a
CLOSE FFLUSH() SET AUTOSAVE FoxWin FoxDos
KBCategory: kbprg
KBSubcategory: FxprgGeneral


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 5, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.