Subject Re: [IBO] Change sort order to some custom logic
Author Jason Wharton
IBO doesn't do any sorting on its own. It does perform some sort sensitive
operations however. You override the OnCompareText event in order to match
the sort algorithm being used by the server. IBO defaults to the Delphi
ASCII (ANSI) collation of text. This isn't always suitable for different
collations used on the server.

HTH,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com


----- Original Message -----
From: "mircostange" <mirco@...>
To: <IBObjects@yahoogroups.com>
Sent: Monday, June 10, 2002 2:49 AM
Subject: [IBO] Change sort order to some custom logic


Hi everyone,

my application currently uses the default ordering options to display
the contents of a table in a grid. The field to be used for sorting
is a character field in the database.

Unfortunately, in some cases this field may contain digits only, in
which case the sort order produces a correct, but unusual order, e.g.
1,10,12,2,20,21,...
I would like to change the way sorting is handled. Two options seem
to be appropriate:
1st: change the sort logic in the database (collation order). Will
IBO properly use that order (I know that IBO does some sorting on its
own). Is there a setting that sorts digit-only rows like numbers and
non-digit rows alphabetically?
2nd: change the OnCompareText method to overwrite the sorting in IBO.
Does this really affect all sorting options? Does IBO never use FB's
ORDER BY clause then?

I would appreciate any input on this issue

Mirco