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.3 . Guide To CA-Clipper - <b>blobrootlock()</b> http://www.X-Hacker.org [<<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()

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