Subject R: [IBO] TIBOTable and incremental search
Author Enrico Raviglione
If you use TIBO* why you don't use some IncSearch objects like InfoPower
TwwIncrementalSearch or Orpheus TOvcDbSearchEdit ?
You can connect this object directly to TIBOQuery.
For performance reason are better make an upgrade to IBO4, incremental
search with IBO3 - TIBO* objects are slower if the table are big.

Regards,
Enrico Raviglione.



-----Messaggio originale-----
Da: Duilio Foschi [mailto:dedalus@...]
Inviato: sabato 9 febbraio 2002 11.41
A: ibobjects@yahoogroups.com
Oggetto: [IBO] TIBOTable and incremental search


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



___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/