Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to understand Option Compare Database statement?

Posted on 2001-06-22
2
Medium Priority
?
394 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 400 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

721 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