Subject RE: [IBO] IBO 4.9.9, D2010 and Filter
Author Dmitry Beloshistov
Hello!

I`m find solution, but it`s not perfect...


1) SQL previous was defined as
"SELECT *
FROM USERS
ORDER BY FULLNAME
FOR UPDATE;"

and Filter DON`T work



2) I`m change SQL to

"SELECT *

FROM USERS

WHERE ID=ID

ORDER BY FULLNAME

FOR UPDATE"



and Filter WORK.

I.e. if in TIB_Query.SQL not defined WHERE clause - filter don`t work properly (internal SQL parser?).


WBR, Dmitry Beloshistov AKA [-=BDS=-]

From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf Of Support List
Sent: Tuesday, September 27, 2011 5:43 AM
To: IBObjects@yahoogroups.com
Subject: RE: [IBO] IBO 4.9.9, D2010 and Filter



> Hello!
>
> Simple question about filtering (I`m use IBO 4..9.9 and D2010)...
>
> 1)
> // set SQL text and Run query - all success
> IB_Query1.SQL.Text:='SELECT * FROM USERS';
> IB_Query1.Open;
>
> 2) Now I want filter some records...
> // in ComboBox1.OnChange
> IB_Query1.DisableControls;
> IB_Query1.Filtered:=False;
> IB_Query1.Filter:='FIRMID='+IntToStr(FirmIDFromCombo); // I`m store
> FIRMID in ComboBox.Items.Objects
> // Now I see IB_Query1.Filter='FIRMID=1' - it`s OK
> IB_Query1.Filtered:=True;
> IB_Query1.EnableControls;
>
> ....and Oops! - any changes in grid ;((((
>
> Where I`m wrong? Anybody has same problems?
>
> P.S. OnFilter() don`t work too.

It likely has to do with the DisableControls and EnableControls. Please
remove those and see what happens.

Jason



[Non-text portions of this message have been removed]