Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.2 . The Guide To CA-Clippe - <b>dbclosearea()</b> http://www.X-Hacker.org [<<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

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson