Determines where the record pointer is positioned after FIND or SEEK unsuccessfully searches for a record.
SET NEAR ON | OFF |
Parameters
- ON
- Positions the record pointer on the closest matching record if a record search using FIND or SEEK is unsuccessful. With this setting, RECNO(В ) returns the record number of the closest matching record, FOUND(В ) returns false (.F.), and EOF(В ) returns false (.F.).
- OFF
- (Default) Positions the record pointer at the end of the table if a record search using FIND or SEEK is unsuccessful. With this setting, RECNO(В ) returns the number of records in the table plus 1, FOUND(В ) returns false (.F.), and EOF(В ) returns true (.T.).
Remarks
A search is unsuccessful when no record meets the search criteria.
Issuing RECNO(В ) with an argument of 0 returns the record number of the closest matching record if a search is unsuccessful, regardless of the setting of SET NEAR.
SET NEAR is scoped to the current data session.