Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Locate Vs. Find In Old Procedural Code 1

Status
Not open for further replies.

drosenkranz

Programmer
Sep 13, 2000
360
US
Hello There,
I'm working on an old (very very old) FoxPro application. I'm adding a couple of reports to the menu but my Locate statements are taking their good ol' time- even though there is an index on these fields. The tables are all free tables with .idx files.

Should I be using the FIND - SKIP commands instead of the LOCATE - CONTINUE commands ?

Thanks,


The 2nd mouse gets the cheese.
 
Hi
LOCATE by nature is very slow with indexed tabels. Use SEEK() or Select-SQL instead.
Thanks Walid Magd
Engwam@Hotmail.com
 
If dbf has an index, use the seek command to get to a starting point. "Copy rest to tempfile while ?? for ??" works really fast on large files. SQL is too picky for my taste, but it works if syntax is right.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top