Subject Re: [IBO] errors with TIB_LookupCombo
Author Geoff Worboys
> ie
> For the item '7812', if 781 was typed in, the combo correctly
> displayed 7812, and maintained that when tabbed out of. But if the
> whole 7812 was typed in, it would be visible in the combo UNTIL
> tabbed out of, at which point the combo changes the item in the
> combo to the item above. (in this case 78-284)

> Any ideas, anyone?

Its a character set issue. IBO gets is data from IB/FB which sorts
according to the character set and collation defined there. Windows
has its own character-set/collation which often has a different sort
order. Hyphens are one of those characters than often trip the
difference.

eg: My Windows sorts the following as shown:
7777
7811
78-11
78-21
7999

The same listed sorted in a charset none database comes out as:
7777
78-11
78-21
7811
7999


You must assign code to the TIB_Connection.OnCustomCompareStr and
OnCustomCompareText functions. For example, if you dataset is
using a character of none (equivalent to ASCII) then you can
simply embed code that uses the VCL CompareStr and CompareText
functions (IBO uses the AnsiCompareStr and AnsiCompareText functions
by default).

hth

--
Geoff Worboys
Telesis Computing