Subject | Re: [firebird-support] return status from SP |
---|---|
Author | Martijn Tonies |
Post date | 2006-10-12T10:34:51Z |
Hi,
Create a select-able stored procedure:
create procedure ...
It should return a parameter "Status: varchar(..." or whatever
you want to use. eg, if it's 5 step parameter, you could also
return a smallint.
After each step, use SUSPEND.
Now, call the procedure:
select * from my_selectable_procedre;
while not query.eof
do begin
show-progress-to-user;
query.next;
end;
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com
> I have a long running stored procedure which doesThere's actually only 1 way to do this.
> alot of things. I need to be able to report the status
> of operation to client at certain points...Just a simple string
> message would do...
>
> Any ideas how to implement this?
Create a select-able stored procedure:
create procedure ...
It should return a parameter "Status: varchar(..." or whatever
you want to use. eg, if it's 5 step parameter, you could also
return a smallint.
After each step, use SUSPEND.
Now, call the procedure:
select * from my_selectable_procedre;
while not query.eof
do begin
show-progress-to-user;
query.next;
end;
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com