Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange Invalid key length (Error 112) message
Message
 
 
To
30/05/2001 07:10:09
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00512427
Message ID:
00512696
Views:
7
From the Hacker's Guide (forgive the copyright problems):

quote:
A caution: Recently we've run into a few cases where the performance of FoxPro's queries is far slower than we'd expect. In some cases, joins between tables where one table is lacking the proper index results in missing records. In all of these cases, the problem was that the indexes were created with a non-Machine collation. Our thumbrule: Always create index tags with the Machine sequence if they are to be used in Select statements.

Each collation sequence has specific ordering rules, needed for a specific purpose. For example, to list an alphabetical sequence of names in German, SET COLLATE TO "GERMAN". A handy ordering sequence for case-insensitive sorts is the GENERAL sorting order.

All collation sequences except Machine use 2 bytes per key so the maximum size of a key expression is only 120 bytes, not 240 as Help states.

Example SET COLLATE TO "GENERAL"
===========================================


>>I seem to recall that if SET COLLATE is anything other than MACHINE, maximum key length is 120 instead of 240.
>
>Exactly!!!
>
>I had a SET COLLATE TO "GENERAL" because of portuguese acented names in another table, without a "closing" SET COLLATE TO "MACHINE", but, anyway, I wasn't aware of this key length issue.
>
>After reading your helpful reply I went back again to error 112, INDEX ON and SET COLLATE explanations and found no reference to what you told me. Please, where can I find a reference to this in VFP docs?
>
>Thank you very much, All.
>
>Best regards,
>
>Fernando
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform