Sort Order Rules

<< Click to Display Table of Contents >>

Navigation:  Apollo ADO.NET Provider >

Sort Order Rules

image\tip.gif This is an important topic that affects virtually every database developer and application written using any database engine, not just Apollo.

By default, Windows sort order places "-" before " " (dash before the space). This may not be the desired behavior for legacy DOS systems. To customize your collation sequence and share data with DOS applications (OEM sorting), call the Query objects SetMachineCollation before opening or updating your tables.

DOS Sorting Rules <> Windows Sorting Rules

Normally, data is expected to be sorted as follows:

test                Note: DOS sorts " " before "-"

test - 1

test 1

However under Windows (Apollo uses Windows Sort Rules by default), the default linguistic ordering is actually as follows:

test - 1        Note: Windows sorts "-" before the " "

test

test 1