Solved

How to understand Option Compare Database statement?

Posted on 2001-06-22
2
381 Views
Last Modified: 2012-06-27
Hi! I wrote a couple of modules at Access 97. The default statement is Option Compare Database. The other options are Option Compare Binary and Option Compare Text. I understand these two. But I seem not quite clear about Option Compare Database.

On Access 97 help, it says that 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.

I could not find the locale ID of the database having my modules. How do I know that? If I obtain the locale ID, how do I know its sort order? Is it based on text or binary?

I tested on the string comparison by Option Compare Database in my database. It is based on case-insensitive text sort order. I also found CollatingOrder property of the database is 1033 which is dbLangGeneral(;LANGID=0x0409;CP=1252;COUNTRY=0).

Is that means the locale ID of the database is general English and the string comparison is based on the text sort order of English which is case-insensitive?

What is a better way of understanding this?

Jzzhang
0
Comment
Question by:jzzhang
2 Comments
 
LVL 2

Accepted Solution

by:
Bicman earned 100 total points
ID: 6220547
You looked at the Help file but you needed to read a little further.  In Help, under "Option Compare Statement", select "Specifics" up at the top.  That additional explanation will point you in the right direction.

By the way, when you get to "Tools / Options", go to the Module tab and select "Require Variable Declarations".  This will add the "Option Explicit" statement to your General Declarations section every time.  It forces you to declare everything but I hate it when I type "inttest" and all my occurrences of "intTest" are suddenly changed.

Hope this helped, Bicman
0
 
LVL 2

Author Comment

by:jzzhang
ID: 6225169
Thanks for you help.

Jzzhang
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now