Show/Hide Toolbars

XSharp

NoteThis command is defined in a header file and will be preprocessed by the X# preprocessor to a function call. If you disable the standard header (-nostddefs) files then this command will not be available. If you tell the compiler to use a different standard header file (-stddef ) then this command may also be not available

Purpose

Flush all pending updates in all work areas.

Syntax

COMMIT [ALL]

Description

COMMIT causes all pending updates to all work areas to be written to disk.  It is functionally equivalent to DBCommit() for every occupied work area.  
COMMIT ALL is functionally equivalent to DBCommitAll().

All updated database and order buffers are written to disk, and a OS Commit request is issued for all files associated with all work areas.

Notes

Shared mode: COMMIT makes database updates visible to other processes.  To insure data integrity, issue DBCommit() before an unlock operation.  

Examples

In this example, COMMIT forces a write to disk after a series of memory variables are assigned to field variables:

 

USE sales EXCLUSIVE NEW
 
APPEND BLANK
REPLACE Sales->Name WITH "Jones"
REPLACE Sales->Amount WITH 123.45
COMMIT

Assembly

XSharp.RT.DLL

See Also

DBCommit(), DBCommitAll(), GO, SKIP