Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GO TOP before SEEK?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00471932
Message ID:
00472849
Views:
40
Hi Steve.

>> Between LOCATE and SQL and SCAN (none of which require a SET ORDER), why SEEK at all? <<

Oh, I almost forgot. SEEK does not require a SET ORDER to anything or even that you change work areas (which, BTW, you DO have to do if you are going to use LOCATE). Compare this:
IF SEEK( < MyValue >, '< MyAlias >', '< MyTag >' )
   *** Record is found. Do something
ENDIF
To what you need to do the same thing with LOCATE:
lnSelect = SELECT()
SELECT < MyAlias >
LOCATE FOR < SomeCondition >
IF FOUND()
   *** Record is found. Do something
ENDIF
SELECT ( lnSelect )
Less code means fewer bugs ;-)

Marcia
Previous
Reply
Map
View

Click here to load this message in the networking platform