Flush all pending updates in one work area.
XSharp.RT (in XSharp.RT.dll) Version: 2.4a
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 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.
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:
2 LOCAL cName, cAmount
3 USE sales EXCLUSIVE NEW
4 cName := Sales->Name
5 cAmount := Sales->Amount
6 @ 10, 10 GET cName
7 @ 11, 10 GET cAmount
9 IF Updated()
10 IF DBAppend()
11 REPLACE Sales->Name WITH cName
12 REPLACE Sales->Amount WITH cAmount