Click or drag to resize

DbCommitAll Function

Flush all pending updates in all work areas.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.10
Syntax
 FUNCTION DbCommitAll() AS LOGIC
View Source

Return Value

Type: Boolean
TRUE if successful; otherwise, FALSE.
Remarks
DBCommitAll() causes all pending updates to all work areas to be written to disk.  It is equivalent to calling DBCommit() for every occupied work area. For more information, refer to DBCommit().
Tip Tip
DBCommitAll() 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.
Examples
The following example writes all pending updates to disk:
X#
FUNCTION Start()
        LOCAL cLast := "Winston"
        DBUseArea(TRUE, "DBFNTX", "sales", ;
                                "Sales", TRUE)
        Sales->DBSetIndex("salefnam")
        Sales->DBSetIndex("salelnam")
        DBUseArea(TRUE, "DBFNTX", "colls", "Colls", ;
                                TRUE)
        Colls->DBSetIndex("collfnam")
        Colls->DBSetIndex("colllnam")
        IF Sales->DBSeek(cLast)
                IF Sales->Deleted() .AND. Sales->RLock()
                        Sales->DBRecall()
                        QOut("Deleted record recalled.")
                ENDIF
        ELSE
                QOut("Not found")
        ENDIF
        // Processing done, write updates to disk and
        // close files
        DBCommitAll()
        DBCloseAll()
See Also