Subject Re: [IBO] AssignSQLWithSearch
Author Helen Borrie
At 10:12 AM 01-11-02 +0100, you wrote:
>Hi All,
>Can you try to help me with the following question?
>I have a base form with TIB_Query on it and I use this form to make
>descendants of it in all the application. Sometimes I need to display the
>resultset in a TDBChart. This component requires TIBODataset, I use
>IIBOQuery. Because of complexity of the base form I do not want to write
>same base form with TIBOQuery. I tried to add TIBOQuery to the form and then
>use this:
>
>qrIBOQuery.AssignSQLWithSearch(qrIB_Query);
>Open;
>
>But it is strange that the same query is opened twice. For the first time
>when form is created and the TIB_Query is opened and afterwards for the
>second time when the AssignSQLWithSearch and TIBO_Query.Open methods are
>executed.
>
>Is there any better solution how to share the resultset between TIB_Query
>and TIBOQuery without need to open the query twice? Suppose the query is
>slow, then this approach beats the performance.

Well, you are not sharing the resultset this way. You are duplicating the
characteristics of the first query to the second. They are two different
queries, operating independently.

Helen