Function DbRequest() Foundation

Transfers an alias name from the Zero space into the current work space.

DbRequest( [<cAlias>], [<lFreeArea>], ;
           [<@bAreaBlock>], [<lWait>] ) --> lSuccess
<cAlias> is a character expression specifying the alias name of the work area to be transferred from the Zero space into the current work space. If not specified, the next alias name pending in the Zero space is transferred.
<lFreeArea> is a logical value specifying whether an unused work area should be selected prior to the transfer. It defaults to .F. (false). This means that an unused work area is not selected. If the work area of the current work space is used, all files are closed in this area with DbCloseArea(). Then the alias name is transferred from the Zero space.
<@bAreaBlock> is an optional variable that must be passed by reference. It receives the code block associated with the work area in the Zero space. The code block is specified when calling function DbRelease(). As an alternative, this code block can be retrieved with the function DbJob().
The optional parameter <lWait> determines whether DbRequest() waits until a work area is found in the Zero space and can be transferred to the current work space. It defaults to .F. (false). This means that the function does not wait but returns immediately even if the Zero space is empty. If .T. (true) is specified, the function waits until it detects an alias name in the Zero space that can be transferred.

The return value of DbRequest() is .T. (true) if an alias name is transferred to the current work space, otherwise it is .F. (false).


The function DbRequest() transfers alias names from the virtual work space (Zero space) into the current work space. It is the counterpart of DbRelease(), which transfers alias names into the Zero space.

The transfer of alias names follows the FIFO principle (First in first out). If the Zero space contains multiple alias names, DbRequest() transfers the alias that was released first. If <cAlias> is specified DbRequest() transfers the first alias name that matches <cAlias>. For more information, refer to function DbRelease().


If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.