[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 BLOBROOTLOCK()
 Obtain a lock on the root area of a BLOB file
------------------------------------------------------------------------------
 Syntax

     BLOBROOTLOCK() --> lSuccess

 Returns

     BLOBROOTLOCK() returns true (.T.) if successful; otherwise, it returns
     false (.F.).

 Description

     Use BLOBROOTLOCK() when accessing the database file in shared mode to
     obtain a lock on the root area of a BLOB file for reading from or
     writing to the root area.

     By default, this function operates on the currently selected work area.
     It can be made to operate on an unselected work area by specifying it
     within an aliased expression.

 Examples

     .  This example illustrates how to properly lock and unlock the
        root area of a BLOB file for a database file opened in shared mode:

        FUNCTION GETSETTINGS()
        LOCAL aCustSettings

        // Open a customer file in shared mode
        USE customer NEW SHARED DBFCDX

        IF BLOBROOTLOCK()
           aCustSettings := BLOBROOTGET()
           BLOBROOTUNLOCK()
        ELSE
           Alert("Could not obtain root lock of Customer;
              file")
        ENDIF

        CLOSE

        RETURN aCustSettings


See Also: BLOBROOTGET() BLOBROOTPUT() BLOBROOTUNLOC()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson