Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Indexing a file?
Message
From
18/10/2002 08:35:34
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
18/10/2002 08:27:10
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00712791
Message ID:
00712805
Views:
7
>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)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform