Testing for NLS sorting/collation behavior changes when calling JetAttachDatabase

The JetAttachDatabase function’s JET_bitDbDeleteCorruptIndexes and JET_bitDbDeleteUnicodeIndexes options help assist applications in upgrading indexes due to underlying OS collation/sorting behavior changes. When the operating system’s Unicode sorting version changes, that changes the behavior of collation of the system.  In those cases, database indexes need to be reindexed in order to ensure that they are accurate.  Fortunately…

0

What is Title Case?

Disclaimer: I’m not an English teacher (that’s my mom), so I’m sure my description of title casing in English probably has exceptions/variations. Title casing has an interesting history in computer programming.  Programmers like to use CamelCase to make variable names more readable, and, particularly amongst developers native to some languages, there’s an idea that title…

4

How come Substring(0, xxx) matches something, but StartsWith returns false?

I was asked how a string can match a substring of another string, yet StartsWith can return false?  For example:   string str = “Mux0308nchen”;string find = “Mu”;Console.WriteLine(“Substring: ” + (str.Substring(0,2) == find));Console.WriteLine(“StartsWith:” + str.StartsWith(find));Console.WriteLine(“IndexOf:   ” + str.IndexOf(find));   returns this:   Substring: TrueStartsWith:FalseIndexOf:   -1   So if you test the first 2 characters with the…

2

How to tell if the collation version changed.

I added this to the msdn wiki for collation, but I’ll blog about it here too.  Occasionally we change the sorting behavior because new code points are added to Unicode, or we find out betterer data or made a mistake (never!) or whatever.  Unfortunately if you built an index (like for a binary search), then when…

0