Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Indexing a file?
Message
De
18/10/2002 09:24:17
 
 
À
18/10/2002 08:35:34
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00712791
Message ID:
00712828
Vues:
8
>>2) The SET ORDER statement should not have quotation marks around the TAG's name.
>
>I don't agree here. First, the SET ORDER command accepts its parameter both with and without quotation marks.

Correct. I WAS WRONG.
>
>Second, using quotation marks, you make sure that an actual tag is selected, NOT a field or other expression.

Yes, that would be a problem too IF the unquoted name used was numeric AND its value was within the count of TAGs in the table.

I shall now start using quotes around TAG names.

Thanks



>
>Example: Let's say I use
>
>
>SET ORDER TO MyField
>
>
>in the assumption that there is an index on MyField. But there isn't, so the value of field MyField is used instead. Now, this field happens to contain the number "3", so my command becomes interpreted as:
>
>
>SET ORDER TO 3
>
>
>Therefore, it is much safer to always use quotation marks. That way, if you don't have the index, you will get a clear error message instead of a hard-to-track bug.
>
>Regards, Hilmar.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform