Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Record is not in index (Error 20) Cause?
Message
From
28/01/2024 11:33:37
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
28/01/2024 10:51:39
Lutz Scheffler (Online)
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01687574
Message ID:
01687587
Views:
32
>>Did you make sure that the collation on the tag is machine? I've seen weird things happen when it's anything else, and the index expression becomes a value conformant to current codepage's rules, not necessarily the same value that was calculated. Should not happen on character fields, but for any other kind of field, there's a possibility.
>
>Just to be curious.Could this happen for a table freshly created? I have machine as default, so it never happened to me.

Yes it can. It's not something that happens over time, as a result of some bug, it's that when a value is written into a field, it conforms to the character translation table as per its collation sequence, so if e.g. your numeric index has a byte corresponding to é, it will be translated to a value such that it comes between e and f. Most of the time this doesn't matter, but when you hit such a value it's possible that a seek() returns not just a „not found“ but „not in index“, probably because seek() or other record-accessing functions respect the current set("collate"), not the one used when the index was created. Believe me, this was one of the hardest to catch, and it still found a way to bite me unexpectedly.

Now if you don't use any collations... where do ö, ü and ä appear in your lists? In their proper places or...?

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform