Subject Searching over two columns
Author malyv9
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;