[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FIND vs SEEK
------------------------------------------------------------------------------

     In CA-Clipper, you can use the FIND command only to locate keys in
     indexes where the index key expression is character data type.  This
     differs from dBASE III PLUS where FIND supports character and numeric
     key values.

     Note:  In CA-Clipper programs, always use the SEEK command or the
     DBSEEK() function to search an index for a key value.

     The DBFNTX driver lets you recover from data type errors raised during a
     FIND or SEEK.  However, since Error:canDefault, Error:canRetry or
     Error:canSubstitute are set to false (.F.), you should use BEGIN
     SEQUENCE...END to handle such SEEK or FIND data type errors.  Within the
     error block for the current operation, issue a BREAK() using the error
     object that the DBFNTX database driver generates, like this:

     bOld := ERRORBLOCK({|oError| BREAK(oError)})
     .
     .
     .
     BEGIN SEQUENCE
        SEEK xVar
     RECOVER USING oError
        // Recovery code
     END
     .
     .
     .
     ERRORBLOCK(bOld)

     There is an extensive discussion of the effective use of the CA-Clipper
     error system in the Error Handling Strategies chapter of the Programming
     and Utilities guide.


This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson