General information
Category:
Coding, syntax & commands
>well had i realized that my small question would have caused such a controversy i would have thought twice. haha.
LOL Erin :)
I think everyone had quite forgot you.
The reason you are getting similar results is because VFP is optimizing your LOCATE. It noticed you had an index available on that field and decided to use it without asking you.
If you SET OPTIMIZE OFF it will not be so helpful and you should see a big difference. Of course it could just be that the value you are LOCATEing for is near the top of your table, try a value at the bottom.
In general make sure SET OPTIMIZE is always on.
You might also like to play around with the LOOKUP command.
Whilst this command is not optimizable it is great for looking up data in small tables that don't have an index.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only