[<<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 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 DBFNDX driver lets you recover from a data type error 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 a SEEK or FIND data type error. Within the
error block for the current operation, issue a BREAK() using the error
object the DBFNDX 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