Subject Re: [IBO] Re: Searching over two columns
Author Jason Wharton
You need to include the space in the search criteria for it to match an item
with a space in it.

Jason Wharton

----- Original Message -----
From: "malyv9" <malyv9@...>
To: <IBObjects@yahoogroups.com>
Sent: Friday, May 21, 2010 12:53 AM
Subject: [IBO] Re: Searching over two columns


>I didn't write version, so I use IBO 4.5B, D5 Pro, XP Pro. However I think
>it is not important in this case.
>
> Best Regards,
> Pavol Svorc
>
> --- In IBObjects@yahoogroups.com, "malyv9" <malyv9@...> wrote:
>>
>> I have two columns. Sorting is perfect, but I can't search with
>> TIB_IncSearch.
>>
>> Smith Bob
>> Smith Michael
>> Smith Paul
>> Something Else
>>
>> I can't search e.g. Smith Michael. If I type only Smith cursor is on
>> first record. If I type SmithM cursor is on fourth record. What is wrong?
>>
>>
>> qryPac: TIB_Query;
>>
>> with qryPac do
>> begin
>> ...cut...
>> with OrderingItems do begin
>> Clear;
>> Add('Name=PAC.FIRSTNAME, PAC.LASTNAME');
>> ...cut...
>> with OrderingLinks do begin
>> Clear;
>> Add('Name=1');
>> ...cut...
>>
>>
>> IncSrch1: TIB_IncSearch;
>>
>> procedure TFormHladaj.FormShow(Sender: TObject);
>> begin
>> with IncSrch1 do begin
>> SeekNearest := True;
>> DataSource := ds;
>> end;
>> ds.DataSet.GetOrderingItemsList( cbSearchingLinks.Items );
>> if cbSearchingLinks.ItemIndex <> Abs( ds.DataSet.OrderingItemNo ) - 1
>> then
>> cbSearchingLinks.ItemIndex := Abs( ds.DataSet.OrderingItemNo ) - 1;
>> end;