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.2 . Drivers Guide - <b>find vs seek</b> http://www.X-Hacker.org [<<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.


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