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

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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform