Flush all pending updates in one work area.
XSharp.RT (in XSharp.RT.dll) Version: 2.10
Syntax View Source
FUNCTION DbCommit() AS LOGIC
public static bool DbCommit()
TRUE if successful; otherwise, FALSE.
DBCommit() causes all updates to the work area to be written to disk.
By default, this function operates on the currently selected work area.
It can be made to operate on an unselected work area by specifying it within an aliased expression or by calling the overload that accepts a workarea parameter (a workarea number or alias ).
All updated database and order buffers are written to DOS, and a DOS Commit request is issued for the database file and any index files associated with the work area.
DBCommit() performs the same function as the DBCommitAll() function, except that it operates only on the current or aliased work area.
Shared mode: DBCommit() makes database updates visible to other processes. To insure data integrity, issue DBCommit() before an unlock operation. For more information, refer to "Concurrency Control" in the Programmer's Guide.
DBCommit() uses DOS interrupt 21h function 68h to perform the solid-disk write. It is up to the network software to properly implement this request. Check with the network software vendor to see if this is supported.
In this example, DBCommit() is used to force a write to disk after a series of memory variables are assigned to field variables:
LOCAL cName, cAmount
USE sales EXCLUSIVE NEW
cName := Sales->Name
cAmount := Sales->Amount
@ 10, 10 GET cName
@ 11, 10 GET cAmount
REPLACE Sales->Name WITH cName
REPLACE Sales->Amount WITH cAmount