Subject | Re: delayed suspend |
---|---|
Author | peppepolpo |
Post date | 2009-06-04T17:36:35Z |
Ivan,
I hope you are talking of Firebird, I hope :)
Anybody can see that if an exception is raised at the 100,000th suspended row (out of 500,000), no row at all is returned, exactly as Helen said.
Try the attached code with
select * from test(1000)
and report back.
Rgds
Peppe
set term ^ ;
create exception abort 'abort'^
create procedure test(tot:integer)
returns
(
i integer
)
as
begin
i=0;
while (i<=tot) do
begin
i=i+1;
if (i=100) then
exception abort;
suspend;
end
end
^
I hope you are talking of Firebird, I hope :)
> In some long running SPs I use SUSPEND to set progress bar, and it works nice,this is exactly what I could never do, so to me you are 100% wrong :)
Anybody can see that if an exception is raised at the 100,000th suspended row (out of 500,000), no row at all is returned, exactly as Helen said.
Try the attached code with
select * from test(1000)
and report back.
Rgds
Peppe
set term ^ ;
create exception abort 'abort'^
create procedure test(tot:integer)
returns
(
i integer
)
as
begin
i=0;
while (i<=tot) do
begin
i=i+1;
if (i=100) then
exception abort;
suspend;
end
end
^