Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is something wrong with this SEEK?
Message
De
27/12/2006 16:10:38
 
 
À
27/12/2006 16:04:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01180555
Message ID:
01180597
Vues:
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.
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform