Subject Re: [firebird-support] Re: Problem when returning values with EXECUTE STATEMENT
Author Helen Borrie
At 10:38 PM 20/11/2009, you wrote:

>create procedure aux_borrame_driver_proc(Par integer)
>returns
>(
> r1 integer,
> r2 varchar(50)
>)
>as
>DECLARE VARIABLE Sql VARCHAR(1024);
>declare variable Pname varchar(200);

Missing declarations:
declare variable v1 integer;
declare variable v2 varchar(50);

>BEGIN
> -- get the procedure name from a table
> select p.sql
> from rshk_procedimientos p
> where p.id_procedimiento = 1
> into :Pname;
>
>
> Sql = 'execute procedure ' || Pname || '(';
> Sql = Sql || CAST(Par AS VARCHAR(20)) || ', ' || CAST(Par AS
>VARCHAR(20)) || ')';

Missing:
Sql = Sql || 'returning_values ((:v1), (:v2))';


> EXECUTE STATEMENT Sql into :r1, :r2;
>
>END

./heLen