Subject | Change sort order to some custom logic |
---|---|
Author | mircostange |
Post date | 2002-06-10T09:49:19Z |
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
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