Gates Is Antichrist
Well-known Member
- Joined
- Aug 15, 2002
- Messages
- 1,961
This is tough to search for information about, since due to its "default nature" it's sitting atop so much example code out there that it causes vast numbers of false positives. Anyway it's so stupidly documented in Access (ACC2003) that I believe it's won awards at the "Microsoft:We Are God" festivities in Redmond. I expect you'll do a better job here.
In ACC03 VBA help they do a good job with Binary and Text forms of Option Compare. In fact those two help items are possibly the best documented functions I've ever seen in a Microsoft product. Someone said to him/herself, "How can I/we write this so that the user will truly have no confusion?" No doubt the employee(s) and/or contractor(s) were sent with Klink to the Siberian Front for such insolence, but the help stayed in, and it really works.
Now, the Database case, still from ACC03 help: "Option Compare Database can only be used within Microsoft Access. This results in string comparisons based on the sort order determined by the locale ID of the database where the string comparisons occur."
Huh? Say what? My locale is the US - so they sort in the order of the English language alphabet? Huh?
Let's try microsoft.com: the knowledgebase! And OMG, they have an article entitled "ACC: Explanation of "Option Compare Database" Statement" Hallelujah! My prayers have been answered! Now I'm going to learn what Database means here! http://support.microsoft.com/kb/98227 but - wait - it's only for Access 95 and earlier. Oh well, I'm sure they link to the article I need for ACC97 and ACC03? NOT.
Well, I read it because no doubt the meaning can't have changed THAT much since ACC95. And once again they wrote examples. Fantastic. (Examples are THE key to understanding - know it, learn it, live it.) But they never explain what Database does - only examples. Weird unintuitive examples. (If someone can explain them, please do!) They do refer to the "New Database Sort Order setting you select in the Items box of the Options dialog box" but I can't locate those in ACC03. I don't even see anything remotely similar.
BTW, in http://support.microsoft.com/kb/225878/en-us, while ingeniously defending the removal of Option Explicit by default, they indicate the Option Compare Database is the default (for Access 2000, anyway). But 2003 help says "If a module doesn't include an Option Compare statement, the default text comparison method is Binary." This makes sense and seems consistent and logical. The default behavior is for Access to cram "Database" atop new code; if you then remove or disable it, that is interpreted as choosing "Binary."
I suspect that "Option Compare Database" is no big deal and simply effectively gets me to "Option Compare Text" - but it would be nice to know for sure. After all, it's sitting atop nearly every piece of code there is.
In ACC03 VBA help they do a good job with Binary and Text forms of Option Compare. In fact those two help items are possibly the best documented functions I've ever seen in a Microsoft product. Someone said to him/herself, "How can I/we write this so that the user will truly have no confusion?" No doubt the employee(s) and/or contractor(s) were sent with Klink to the Siberian Front for such insolence, but the help stayed in, and it really works.
Now, the Database case, still from ACC03 help: "Option Compare Database can only be used within Microsoft Access. This results in string comparisons based on the sort order determined by the locale ID of the database where the string comparisons occur."
Huh? Say what? My locale is the US - so they sort in the order of the English language alphabet? Huh?
Let's try microsoft.com: the knowledgebase! And OMG, they have an article entitled "ACC: Explanation of "Option Compare Database" Statement" Hallelujah! My prayers have been answered! Now I'm going to learn what Database means here! http://support.microsoft.com/kb/98227 but - wait - it's only for Access 95 and earlier. Oh well, I'm sure they link to the article I need for ACC97 and ACC03? NOT.
Well, I read it because no doubt the meaning can't have changed THAT much since ACC95. And once again they wrote examples. Fantastic. (Examples are THE key to understanding - know it, learn it, live it.) But they never explain what Database does - only examples. Weird unintuitive examples. (If someone can explain them, please do!) They do refer to the "New Database Sort Order setting you select in the Items box of the Options dialog box" but I can't locate those in ACC03. I don't even see anything remotely similar.
BTW, in http://support.microsoft.com/kb/225878/en-us, while ingeniously defending the removal of Option Explicit by default, they indicate the Option Compare Database is the default (for Access 2000, anyway). But 2003 help says "If a module doesn't include an Option Compare statement, the default text comparison method is Binary." This makes sense and seems consistent and logical. The default behavior is for Access to cram "Database" atop new code; if you then remove or disable it, that is interpreted as choosing "Binary."
I suspect that "Option Compare Database" is no big deal and simply effectively gets me to "Option Compare Text" - but it would be nice to know for sure. After all, it's sitting atop nearly every piece of code there is.