C5_COMMIT

 COMMIT
 Perform a solid-disk write for all active work areas
------------------------------------------------------------------------------
 Syntax

     COMMIT

 Description

     COMMIT is a database command that flushes Clipper buffers and
     performs a solid-disk write for all work areas with open database and
     index files.  The solid-disk write capability is available under DOS
     version 3.3 and above.  Under DOS 3.2 or less, COMMIT flushes Clipper
     buffers to DOS.

     In a network environment, issuing a GO TO RECNO() or a SKIP0 will flush
     Clipper's database and index buffers, but only a COMMIT will flush
     the buffers and perform a solid-disk write.  Thus to insure updates are
     visible to other processes, you must issue a COMMIT after all database
     update commands (e.g., APPEND, REPLACE).  To insure data integrity,
     COMMIT should be issued before an UNLOCK operation.  Refer to the
     "Network Programming" chapter in the Programming and Utilities Guide for
     more information on update visibility.

 Notes

     .  COMMIT 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 forces 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
           COMMIT
        ENDIF

 Files   Library is CLIPPER.LIB.

See Also: DBCOMMIT() DBCOMMITALL() GO SKIP

 

4 responses to “C5_COMMIT

  1. Pingback: C5_SKIP | Viva Clipper !

  2. Pingback: C5_REPLACE | Viva Clipper !

  3. Pingback: DB Commands | Viva Clipper !

  4. Pingback: C5 Commands | Viva Clipper !

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.