Subject | Re: Searching over two columns |
---|---|
Author | malyv9 |
Post date | 2010-05-21T06:53:44Z |
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
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;
>