Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is something wrong with this SEEK?
Message
From
27/12/2006 17:58:11
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
27/12/2006 16:33:02
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01180555
Message ID:
01180615
Views:
16
>>>>One of my co-worker saw one of my SEEK() statement and made a "big" deal that I shouldn't do it this way, but he wouldn't say why except to say that "it's not our standard"...
>>>>
>>>>What is wrong With
>>>>
>>>>IF SEEK(MyValue, "MyTable", "MyIndexTag")
>>>> ...
>>>>ENDIF
>>>>?
>>>>
>>>>Is there a reason why I should use this?

>>>>
>>>>So did you check the standards document? <s> Seriously, if someone said that to me today, I'd [among other things] check the standards document, or ask for a copy.
>>>>
>>>>Someone may have already said this - unless I'm really missing something, a SEEK will fail if MyTable has an active filter that excludes MyValue [where MyValue exists in MyTable, but isn't part of an active filter on MyTable]. Same deal with INDEXSEEK. [at least in the simple test I just ran].
>>>>
>>>>However, a SELECT statement will find the record. [which, arguably, should be used anyway, if you ever plan on moving the code to SQL Server]
>>>>
>>>>
>>>>Kevin
>>>
>>>'Seek' gives huge advantage for native data access, and shouldn't be discarded, and I'm pretty sure everyone already moved to SQL-Server in some way.
>>>That's another story that 'Set Filter' had to be discarded 10 years ago when VFP3b appeared.
>>
>>SET FILTER works fine. It's just that many people don't know how to use it.
>
>That's exactly the problem: it works contrary to many other things, i.e. creates exceptions that must be remembered.

I haven't seen anything in computing that does NOT do that. This is Earth after all.
Previous
Reply
Map
View

Click here to load this message in the networking platform