Subject OnPrepareSQL and TIBOQuery
Author Luiz Alves
1. I am trying use a TIBOQuery called 'qroConv' and a TEdit to enter Text
for search.
On Event OnPrepareSQL, I do something as:

if trim(Edit1.Text)<>'' then begin
case qroConv.OrderingItemNo of
1:
qroConv.SQLWhereItems.add(Nconv='+inttostr(strtointdef(Edit1.Text,-999)));
2: qroConv.SQLWhereItems.add('Nome CONTAINING '+quotedstr(Edit1.Text));
end;
end;

2. I have a TDBGrid attached to datasource of tiboquery.

3. In a Button I do:
qroConv.InvalidateSQL;
qroConv.Refresh;


After I click on Button1, appears the problem.

The TDBGrid doesn't shows the rows as due. It appears some blank rows and
others with data. After I try scroll on Grid, I get some AVs.


Am I doing something wrong? This approach works perfectly with IBO native
datasets.

Note: IBO4.F.p/D6/Win2000

Thanks in Advance,
Luiz.