Subject Re: [IBO] tib_grid display on query rerun
Author Thomas Steinmaurer
If your query is already open, then you can execute:

qry.InvalidateSQL;
qry.Refresh;

This will fire the OnPrepareSQL event and refreshes your
dataset with the newly set WHERE clause

Best Regards
Thomas Steinmaurer
IB LogManager 2.0 - The Logging Tool for Interbase/Firebird
http://www.iblogmanager.com

""stanw1950"" <stanw@...> schrieb im Newsbeitrag
news:a274d5+sd9m@......
> My tib_grid's source is a tib_query. If the user changes a where
> condition (in a radio group), then the query must be rerun. The code
> is below. If I don't UnPrepare it, then the onprepareSQL procedure
> won't run, which is where the "wheres" are set up. When the query is
> run the grid goes blank (including the column titles) for the time it
> takes to run. This is visually distracting. I've tried various
> combinations with disable/enable controls and begin/end busy, but
> nothing seems to stop the blanking out of the grid. Any suggestions
> would be greatly appreciated. Thanks. (D6, IBO4.2.fn)
>
> with qry do begin
> DisableControls;
> //BeginBusy(False);
> try
> if Active then Close;
> if Prepared then UnPrepare;
> //the wheres are set up in the qryPrepareSQL procedure
> ParamByName('ID').AsInteger := DataId;
> Open;
> finally
> //EndBusy;
> EnableControls;
> end;
> end;
>
>
>
>
___________________________________________________________________________
> 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/
>
>
>