RDD

DbCommitAll()

Flush pending updates in all work areas

Syntax

Signature
DbCommitAll() --> NIL

Arguments

None.

Return value

NIL.

Description

DbCommitAll() writes pending updates in every open work area to its database and index files. All areas remain open after the operation.

Notes

An I/O failure raises a runtime error.

Example

DbCommitAll.prg
PROCEDURE Main()

   DbCreate( "commit_all_demo.dbf", { { "NAME", "C", 12, 0 } } )
   DbUseArea( .T., , "commit_all_demo.dbf", "People" )
   DbAppend()
   FieldPut( 1, "Anna" )
   DbCommitAll()
   QOut( "Saved records: " + LTrim( Str( RecCount() ) ) )
   DbCloseAll()
   FErase( "commit_all_demo.dbf" )

RETURN

Output

See also