Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Deleted records problem, Again!
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00049672
Message ID:
00049990
Views:
35
>>>>John, if you re-set the record pointer (GO TOP, etc.) after the SET DELETED command it will take effect in the INIT as well.
>>>>
>>>>Barbara
>>>Barbara,
>>>
>>>Actually LOCATE is faster than GO TOP in certain situations. It is because LOCATE is optimizable while GO TOP and GO BOTTOM are not.
>>
>>Jim,
>>Do you mean you can use LOCATE without specifying a FOR condition? If so, where would the record pointer be after you issue LOCATE? At top, where it was? Just curious about this "new" feature.
>>
>>John.
>John,
>
>This new feature has been around since FP 2.0 got Rushmore.
>
> LOCATE
>
>will move the pointer to the first record in the table that is valid for the current filter, with no filter this would be the first record, with a filter it would be the first record that meets the filter criteria. The advantage of using LOCATE over GO TOP, is that GO TOP goes to the very first record and then starts skipping until it hits a valid record, while LOCATE lets Rushmore figure out which record to go to.
>
>If it make you mroe comfortable you could use
>
> LOCATE FOR .T.

Jim.

Thanks for a great tip!!! I've been using Foxpro since 1.02 and I NEVER knew this "undocumented" feature! The manuel and all those books I bought over the years never mentioned this. In fact, the manuel seems to suggest the FOR is not optional but a required clause of command LOCATE. Thanks again!!!

John.
It's "my" world. You're just living in it.
Previous
Reply
Map
View

Click here to load this message in the networking platform