Subject Re: [IBO] Problem with ibIncSearch and Hyphen
Author obfuscatediam
maybe I did not make myself clear (or am just too dense to
understand what you are trying to tell me - I'm not comparing
strings nor searching within one for sub strings)

The problem that I have is in a column of names. For my example I
just cited a sampling to illustrate the problem. When I search the
name column each record being one of the 11 names cited using
ibIncSearch, I can find what is sought with no problem, except where
a preceding name is hyphenated. In the example, a search for
ROADFORCE fails at RO-LIN, searches for any specific
name 'preceding' (in the order shown as they appear in the column)
RO-LIN work fine returning the expected result( or at least I
haven't stumbled on other anomalies). If I edit R0-LIN to be ROLIN,
the problem seems to go away and searches return the expected result
all the time.

Why does the hyphen affect the search result in this way ? What
other characters would cause similar results unless I do something
about them ?

What have I done that I shouldn't have or not done that I should
have ?

put another way ... help :) please



--- In IBObjects@yahoogroups.com, "Luiz" <cprmlao@i...> wrote:
> Maybe these events of tib_connection can help you:
>
> To case sensitive manner:
> function TForm1.IB_Connection1CustomCompareStr(IB_Field:
TIB_Column;
> const S1, S2: String): Integer;
> begin
> Result := CompareStr(S1, S2);
> end;
>
> To case insensitive manner:
> function TForm1.IB_Connection1CustomCompareText(IB_Field:
TIB_Column;
> const S1, S2: String): Integer;
> begin
> Result := CompareText(S1, S2);
> end;
>
> Luiz.
> ----- Original Message -----
> From: "obfuscatediam" <obfuscatediam@y...>
> To: <IBObjects@yahoogroups.com>
> Sent: Friday, March 07, 2003 7:03 PM
> Subject: [IBO] Problem with ibIncSearch and Hyphen
>
>
> > after attributing my problems to just my learning curve and
removing
> > what's left of my hair ;-), I have now isolated the specific
problem
> > that I can't resolve
> >
> > A simple example ... a varchar(65) field contains names such as
> >
> > RINGBALL
> > RITEWAY
> > RITO
> > RIVERSIDE
> > RIVIERA
> > RO-LIN
> > ROAD WARRIOR
> > ROADEX
> > ROADFAST
> > ROADFORCE
> > ROADHAWK
> >
> > when I do an incremental search for 'ROADFORCE (even in the
source
> > code using the data 'tab' in IB_Query), I never
find 'ROADFORCE'. The
> > lookup stops at RO-LIN never getting beyond that entry. If I
change
> > the name RO-LIN to ROLIN, everything works as expected.
> >
> > My conclusion is that the hyphenated word is the culprit - but
why ?
> > How do I fix and the cause of the gotcha so I avoid similar
> > situations ?
> >
> > What am I missing ? How do I fix?
> >
> > Appreciate any and all help