Solved

How to understand Option Compare Database statement?

Posted on 2001-06-22
2
388 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
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…

752 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