Subject Re: [IBO] Queries running asyncronous?
Author Helen Borrie
At 12:05 AM 20/05/2005 +0200, you wrote:
>I'm observing that some queries are running approx. 1 second on
>my system, when my program changes the params.
>That's fine.

It's also quite slow.

>But if the user is hitting buttons to start automatic data manipulation
>very fast after a query refresh started, it's failing as the query doesn't
>seem to be ready.

By "automatic data manipulation" do you mean calling methods that change
the state of the dataset, e..g from dssBrowse to dssEdit? You say that
users are hitting buttons...if these are large or complex queries, it
sounds as though you need to hook button behaviour to the button state of
your TIB_UpdateBar. (If you are not using one, try adding one to your form
and, if you like, setting its Visible property false.)

>Is my observation correct, that it might indeed take a short time until
>the datasoure is feeding the TIB_Edits. Windows is already
>processing messages for other objects on that form, that might
>collide with their data modifiations on the not finished query.
>1.) if there a property to determine: query done and row(s) fetch is

Look at the Fetching property of TIB_Dataset.

>2. ) If there a property to set the query to sync. mode (so the
>query.refresh is blocking the application until row(s) fetching is

TIB_Datasource.DisableInterface ...EnableInterface might be what you
need. However, you still need to take care of "rogue buttons", to make
sure their OnClick event is not available at inappropriate times.