Subject Re: [firebird-support] Call Generator in Stored Procedure
Author NAS
Pavel Menshchikov wrote:

>Hello NAS,
>
>N> why it's not work :
>N> id_xx=gen_id(:param1);
>N> param1 is varchar
>N> I use Firebird 1.52
>AFAIK, you can't use such construction. As a workaround refer to
>EXECUTE STATEMENT (see release notes), something like
>-----
> stmnt = 'select gen_id(' || param1 || ', 1) from rdb$database';
> execute statement stmnt into :id_xx;
>
>
I get SQL error code = -902
wrong request type in EXECUTE STATEMENT XXX

>-----
>
>
>HTH
>
>