Mike Yearwood
Toronto, Ontario, Canada
Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>>>>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.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement