Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to understand Option Compare Database statement?

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
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…
Suggested Courses

972 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