[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 dbEval()
 Evaluate code block for each row (record) in work area
------------------------------------------------------------------------------
 Prototype

     HIDE ERRCODE dbEval(
                             AREAP wa,
                             LPDBEVALINFO lpdbEvalInfo
                           )

 Arguments

     wa is a pointer to self.

     lpdbEvalInfo is a pointer to a structure containing information
     necessary for a code block evaluation.

 Description

     dbEval() evaluates a code block for each row in scope in in the work
     area referenced by wa.

 Default Behavior

     dbEval() emulates the CA-Clipper DBEval() function, obeying the "normal"
     Xbase scoping conditions.  dbEval() calls evalBlock() for each row in
     the database, using the wa's skip() method to traverse the data.  Both
     wa and lpdbEvalInfo->itmBlock are passed to each call of evalBlock()
     while the following conditions are met:

     .  If lpdbEvalInfo->dbsci.itmRecID is set to a number,
        evalBlock() is called once with that physical record number.

     .  If lpdbEvalInfo->dbsci.lNext is set to a number n, then n
        iterations occur.

     .  Otherwise, evalBlock() is called for each record while
        wa->fEof is not true and the lpdbEvalInfo->dbsci.itmCobWhile block
        evaluates to TRUE.

 Implementation Notes

     .  If this method is reimplemented, care should be taken to
        completely emulate the behavior of Xbase scoping.  This will offer
        the CA-Clipper developer maximum compatibility with the Xbase DML.
        Note especially that several of the scoping conditions exclude each
        other, and many opportunities exist for optimization.  The default
        behavior of this method provides a very high level of optimization
        with the default Xbase scoping.

 Files  Header file is Rdd.api.


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