RDD

DbCommit()

Flush pending updates in the current work area

Syntax

Signature
DbCommit() --> NIL

Arguments

None.

Return value

NIL.

Description

DbCommit() writes pending record and structural updates of the current work area to its database and index files. It keeps the work area open.

Notes

I/O failures raise a runtime error. Use DbCommitAll() to flush every area.

Example

DbCommit.prg
PROCEDURE Main()

   DbCreate( "commit_demo.dbf", { { "NAME", "C", 12, 0 } } )
   DbUseArea( .T., , "commit_demo.dbf", "People" )
   DbAppend()
   FieldPut( 1, "Anna" )
   DbCommit()
   QOut( "Saved: " + RTrim( FieldGet( 1 ) ) )
   DbCloseArea()
   FErase( "commit_demo.dbf" )


   RETURN

Output

See also