Subject Re: intermediate messages from a query
Author Peppe Polpo
--- In firebird-support@yahoogroups.com, "Peppe Polpo"
<octopushole@y...> wrote:

> A smart solution would be to build an UDF that sends a Window
> message, so that the main application can easily intercept it (the
> way - I guess all FB SP debug tools work).
>

not so smart, as it would have some meaning only when the database is
local (and working with Windows)...

I suppose there is a way to send a message to the client application
thru TCP/IP, but I have no idea how to do it.

A new feature for FB 2.0 ?

Peppe Polpo


> --- In firebird-support@yahoogroups.com, Helen Borrie
<helebor@t...>
> wrote:
>
> > A way you could test that would be to hook up a TIB_Cursor to a
> SELECT procedure ...
>
> it is not clear to me the solution you suggest, mostly because I am
> not familiar with TIB_Cursor.
>
> Anyway, it won't work for me because I cannot envelope my SELECT in
a
> component: the code is in a SP that is called by another SP, etc.
>
> A smart solution would be to build an UDF that sends a Window
> message, so that the main application can easily intercept it (the
> way - I guess all FB SP debug tools work).
>
> That way, you could write:
>
> create procedure test
> returns
> (cmessage varchar(20)
> as
> declare variable RetCode integer;
> begin
> for select id_emp from tb_emp do
> begin
> cmessagge='employee ' || id_per || ' is being processed';
> RetCode=SendMessageUDF(:cmessage);
> /*some action*/
> end
> end
>
> Unfortunately I don't have much time to solve this problem from
> scratch.
>
> Also one should test the cost in speed decay of the SELECT.
>
> Are you aware of any debug UDF that comes with source ?
>
> Regards
>
> Peppe Polpo