Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Indexing a file?
Message
De
18/10/2002 08:35:34
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
18/10/2002 08:27:10
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:
00712805
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.

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

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.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform