Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread UNION and OnQueryProgress Abort
Fri, Mar 2 2007 3:43 AMPermanent Link

Tomomi Umezawa
I am using DBISAM Ver4.25 Build3.

I execute following SQL, and am displaying the progress bar in the
TDBISAMQuery.OnQueryProgress event.

SELECT * FROM TABLEA
UNION ALL
SELECT * FROM TABLEB

I execute SQL and in the OnQueryProgress event, "True" was returned to the "Abort" variable.

When only one table is processed, "Abort" is effective.
However, "Abort" seems not to work when "UNION ALL" is used.

Have I overlooked anything?
Fri, Mar 2 2007 7:26 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Tomomi,

<< I execute following SQL, and am displaying the progress bar in the
TDBISAMQuery.OnQueryProgress event.

SELECT * FROM TABLEA
UNION ALL
SELECT * FROM TABLEB

I execute SQL and in the OnQueryProgress event, "True" was returned to the
"Abort" variable.

When only one table is processed, "Abort" is effective.
However, "Abort" seems not to work when "UNION ALL" is used. >>

OnQueryProgress is not fired during the actual union operation.  Internally,
the second SELECT * statement simpy resolves to an "open TableB" operation,
which means that the union operation starts immediately after all of the
rows from TableA have been written to the result set.

--
Tim Young
Elevate Software
www.elevatesoft.com

Fri, Mar 2 2007 10:54 AMPermanent Link

"Robert"

"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote in message
news:5C7E1B2F-E5CD-402B-A033-073967D8CB85@news.elevatesoft.com...
> Tomomi,
>
> << I execute following SQL, and am displaying the progress bar in the
> TDBISAMQuery.OnQueryProgress event.
>
> SELECT * FROM TABLEA
> UNION ALL
> SELECT * FROM TABLEB
>
> I execute SQL and in the OnQueryProgress event, "True" was returned to the
> "Abort" variable.
>
> When only one table is processed, "Abort" is effective.
> However, "Abort" seems not to work when "UNION ALL" is used. >>
>
> OnQueryProgress is not fired during the actual union operation.
> Internally, the second SELECT * statement simpy resolves to an "open
> TableB" operation, which means that the union operation starts immediately
> after all of the rows from TableA have been written to the result set.
>

The question seems to be "why can't I abort a query that has UNION?" Because
AFAIK the OnQueryProgress DOES fire while the second select is taking place.

Robert

> --
> Tim Young
> Elevate Software
> www.elevatesoft.com
>

Sun, Mar 4 2007 2:45 AMPermanent Link

Tomomi Umezawa
Tim and Robert&#12288;,  Thank you replay.


My test was as follows.

* If True is NOT set in Abort with OnQueryProgress while TABLEA is being processed,
OnQueryProgress is fired while processing TABLEB.

* OnQueryProgress was not fired after that when True was set in Abort with OnQueryProgress
while TABLEA was being processed.



Mr. Tim said.

> OnQueryProgress is not fired during the actual union operation.

OnProgressQuery does mysterious operation for me while being executing SQL including
UNION.

When I used UNION, I decided that I did not use OnQuryProgress.

Mon, Mar 5 2007 9:35 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Tomomi,

<< My test was as follows.

* If True is NOT set in Abort with OnQueryProgress while TABLEA is being
processed,
OnQueryProgress is fired while processing TABLEB.

* OnQueryProgress was not fired after that when True was set in Abort with
OnQueryProgress
while TABLEA was being processed.  >>

Okay, I misunderstood what you were seeing.  Yes, there is an issue whereas
an abort will not stop the second query from being processed.  I will make
sure that a fix is in the next build 4.

--
Tim Young
Elevate Software
www.elevatesoft.com

Mon, Mar 5 2007 8:54 PMPermanent Link

Tomomi Umezawa
Thank you !!!   Tim

"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote:

> Okay, I misunderstood what you were seeing.  Yes, there is an issue whereas
> an abort will not stop the second query from being processed.  I will make
> sure that a fix is in the next build 4.

Image