Subject Re: [IBO] tib_grid display on query rerun
Author Luiz
> I wrote the code as
> if active then begin
> InvalidateSQL;
> ParamByName('P_ID').AsInteger := CustId;
> Refresh;
> else...//query not open
>
> I occasionally get an AV when it executes the ParamByName statement.
> The AV appears to occur in the IBA_Column.IMP unit in the
> TIB_ColumnInteger.SetValue function. I can probably live with it with
> a silent exception, but do you think my code is correct? Thanks.

I´m going to give my suggestion:

Do you can use:
SQL: qry1='Select * from table1'

On Prepare SQL:
begin
if condition1 then
qry1.SQLWhereItems.Add('ID ='+inttostr(CustId))
else if condition2 then
qry1.SQLWhereItems.Add('ID ='+inttostr(CustId))
....
...
end;

On event on Click of radio group do:
begin
qry1.InvalidateSQL;
qry1.Refresh;
end

Regards,
Luiz