How to Search for Data in FoxPro

Searching for Data in FoxPro:-

The locate command searches the table for the first record, that matters the criteria specified. The locate command option searches sequentially from the top to the end of the table until it finds first record that satisfies the criteria. For example,

Locate for stuname = “Raju” displays Raju in the record pointer.
T (True)
Disp ↵


Continue command can be used to find next occurrence of the condition specified.

Delete command is required when unwanted or obsolete records are to be removed from the table. The desired record is marked for deletion, which sets an internal flag stored in each record in the table. Then the table is packed and marked records are physically removed. For example,

Delete for recono() = 9 displays stuname Ashik of 9 number
List ↵
Pack ↵
Delete for course = “PGDC” ↵
deletes Ashik from the specified course.
List ↵
Recall all ↵
to remove delete. The delete records are manually liable within a table

List ↵
Recall Record 2 ↵
recalls 2nd record only.

Zap command is used to delete all records in a table.

Leave a Reply

Your email address will not be published. Required fields are marked *