Subject TIBOTable and incremental search
Author Duilio Foschi
I use IBO3/D3/FB.

An application was ported fron BDE and is using - for now - several
TIBOTables objects.

I'd like to perform incremental search on one of those tables.

I experimented with TIB_ and learnt how to do incremental search using a
TIB_IncSearc object.

The problem is: TIB_IncSearch will position a TIB_Query to the right record.

Instead, I have to position my TIBOTable.

I tried to read the TIB_Query bookmark and assign it to the TIBOTable, as
below

var
bm:string;
q:TIB_Query;
t:TIBOTable;
begin
// position TIB_Query

bm:=q.BookMark;
t.BookMark:=bm; {1}

...
end;

However, line {1} produces no sensible effect.

Surprisingly, also the following code didn't position the TIBOTable

var
s:string;
q:TIB_Query;
t:TIBOTable;
a:boolean;
begin
// position TIB_Query

s:=q.FieldByName(<keyfieldname>).AsString;
t.IndexFieldNames:='<keyfieldname>';
t.SetKey;
t.FieldByName(<keyfieldname>).AsString;
a:=t.gotokey; {2}

...
end;

line {2} didn't position the table to the wanted record (even if var a was
set to True)

This code worked:

var
s:string;
q:TIB_Query;
t:TIBOTable;
begin
// position TIB_Query

s:=q.FieldByName(<keyfieldname>).AsString;
t.IndexFieldNames:='<keyfieldname>';
t.SetRangeStart;
t.FieldByName(<keyfieldname>).AsString;
t.SetRangeEnd;
t.FieldByName(<keyfieldname>).AsString;
t.ApplyRange;

...
end;

However, the whole process is rather slow.

Is there a better way to perform an incremental search on a TIBOTable ?

Thank you

Duilio Foschi