Subject | Re: [IBO] errors with TIB_LookupCombo |
---|---|
Author | Geoff Worboys |
Post date | 2002-10-16T02:54:38Z |
> I'm not sure on what code to assign in the OnCustomCompareStrfunction TForm1.IB_Connection1CustomCompareStr(IB_Field: TIB_Column;
> event.
const S1, S2: String): Integer;
begin
Result := CompareStr(S1, S2);
end;
function TForm1.IB_Connection1CustomCompareText(IB_Field: TIB_Column;
const S1, S2: String): Integer;
begin
Result := CompareText(S1, S2);
end;
The above should work for character set NONE fields.
> What is the code actually supposed to do?It tells IBO what code to use when comparing strings.
> How does this event manipulate the outcome?When IBO needs to decide whether to progress to the next or prior
row in a dataset it may have to compare text values. The the
search value is GT the current row then IBO needs to go forward.
Since text comparisons control the order, using ANSI comparisons
against text ordered by ASCII gives curious results. The results
are often very strange because IBO will try to jump backwards
and forwards to minimise the number of comparisons required.
> How do I handle the outcome?Just give the code as above, there should not be anything else to
it unless you are using some character set other than NONE.
> The help for this event is quite brief.I agree.
--
Geoff Worboys
Telesis Computing