[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 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
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson