FLUSH Command

Saves table and index changes to disk.

You can use FLUSH to explicitly save to disk all changes that you make to all open tables and indexes. You can also save changes to a specific table by specifying a work area, table alias, or path and name of a currently opened file.

FLUSH [[IN nWorkArea | cTableAlias] | [cFileSpec]] [FORCE]


[IN nWorkArea | cTableAlias] | [cFileSpec]

Specifies the work area number, table alias, or the name of a currently opened file name, for example, an index file or a file opened using the FOPEN( ) function. When specifying a file name, include the path, for example, C:\MyApp\MyTable.dbf.


If you specify cFileSpec, only changes to the specified file are saved unless cFileSpec is the name of a table (.dbf) file in which case FLUSH applies to the table memo (.fpt) file and all open indexes for that table, even if the table is open in another data session.

If you do not specify nWorkArea, cTableAlias, or cFileSpec, FLUSH applies to all open tables and indexes in the current data session.


Calls the Windows API FlushFileBuffers function for all affected files but does not apply to temporary files and files opened as read-only. For more information, see the MSDN online documentation.

Expand imageRemarks

Expand imageSee Also

© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic