C5_DBCLOSEAREA

 DBCLOSEAREA()
 Close a work area
------------------------------------------------------------------------------
 Syntax

     DBCLOSEAREA() --> NIL

 Returns

     DBCLOSEAREA() always returns NIL.

 Description

     DBCLOSEAREA() releases the current work area from use.  Pending updates
     are written, pending locks are released, and any resources associated
     with the work area are closed or released.  DBCLOSEAREA() is equivalent
     to the standard CLOSE command or the USE command with no clauses.  For
     more information, refer to the USE and CLOSE commands.

 Examples

     .  The following example closes a work area via an alias
        reference:

        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() )
              ? "Record deleted: ", Sales( DELETED() )
           ENDIF
        ELSE
           ? "Not found"
           Colls->( DBCLOSEAREA() )
        ENDIF

 Files   Library is CLIPPER.LIB.

See Also: CLOSE DBCLOSEALL() DBCOMMIT() DBUSEAREA() USE



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.