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:
00472166
Views:
38
>Someone told me to always GO TOP before doing a SEEK as follows:
>
>SEEKID = seekaddress
>SELECT mytable
>SET ORDER TO myid
>SEEK SEEKID
>IF FOUND()
>ENDIF
>
>Should I always put a GO TOP or GOTO TOP before the SEEK SEEKID command?

It's pointless, since SEEK() by definition searches from the begining in the sort order. You don't even need to alter the current ORDER BY selection; the SDEEK() function allows you to specify a tag to use for the SEEK() operation, so the potential issue of activating the sort order by moving the record pointer is a non-starter.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform