C5_DBCOMMITALL

 DBCOMMITALL()
 Flush pending updates in all work areas
------------------------------------------------------------------------------
 Syntax

     DBCOMMITALL() --> NIL

 Returns

     DBCOMMITALL() always returns NIL.

 Description

     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() and the COMMIT command.

 Notes

     .  DBCOMMITALL() 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

     .  The following example writes all pending updates to disk:

        cLast := "Winston"
        //
        DBUSEAREA( .T., "DBFNTX", "Sales", "Sales", .T. )
        DBSETINDEX( "SALEFNAM" )
        DBSETINDEX( "SALELNAM" )
        //

        DBUSEAREA( .T., "DBFNTX", "Colls", "Colls", .T. )
        DBSETINDEX( "COLLFNAM" )
        DBSETINDEX( "COLLLNAM" )

        DBSELECTAREA( "Sales" )      // select "Sales" work area

        IF ( Sales->(DBSEEK(cLast)) )
           IF Sales->( DELETED() ) .AND. Sales( RLOCK() )
              Sales->( DBRECALL() )
              ? "Deleted record has been recalled."
           ENDIF
        ELSE
           ? "Not found"
        ENDIF
        //
        // processing done, write updates to disk and close
        DBCOMMITALL()
        DBCLOSEALL()
        QUIT

 Files   Library is CLIPPER.LIB.

See Also: CLOSE COMMIT DBCLOSEALL() DBCOMMIT() DBUNLOCK()



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.