DBCOMMIT() Flush pending updates ------------------------------------------------------------------------------ Syntax DBCOMMIT() --> NIL Returns DBCOMMIT() always returns NIL. Description DBCOMMIT() causes all updates to the current work area to be written to disk. All updated database and index buffers are written to DOS and a DOS COMMIT request is issued for the database (.dbf) file and any index files associated with the work area. DBCOMMIT() performs the same function as the standard COMMIT command except that it operates only on the current work area. For more information, refer to the COMMIT command. Notes . Network environment: DBCOMMIT() makes database updates visible to other processes. To insure data integrity, issue DBCOMMIT() before an UNLOCK operation. For more information, refer to the "Network Programming" chapter in the Programming and Utilities Guide. . DBCOMMIT() uses DOS interrupt 21h function 68h to perform the solid-disk write. It is up to the network operating system to properly implement this request. Check with the network vendor to see if this is supported. Examples . In this example, COMMIT is used to force a write to disk after a series of memory variables are assigned to field variables: USE Sales EXCLUSIVE NEW MEMVAR->Name := Sales->Name MEMVAR->Amount := Sales->Amount // @ 10, 10 GET MEMVAR->Name @ 11, 10 GET MEMVAR->Amount READ // IF UPDATED() APPEND BLANK REPLACE Sales->Name WITH MEMVAR->Name REPLACE Sales->Amount WITH MEMVAR->Amount Sales->( DBCOMMIT() ) ENDIF Files Library is CLIPPER.LIB.
See Also: CLOSE COMMIT DBCLOSEALL() DBCOMMITALL() DBUNLOCK()