Subject Re: error in execute statement into with generator id
Author intellekta
nick, thanks for your help but iam not confirm with your suggestion,
in this moment i found the solution with cast and this works:

TMPSQL = 'SELECT CAST(GEN_ID(GEN_' || TABLENAME || '_ID,1) AS BIGINT)
FROM RDB$DATABASE';
EXECUTE STATEMENT TMPSQL INTO :NEWID;

uwe

--- In firebird-support@yahoogroups.com, "Nick" <nick@...> wrote:
>
> this:
>
> TMPSQL = 'SELECT GEN_ID(GEN_' || TABLENAME || '_ID,1) FROM
RDB$DATABASE';
>
> needs to become:
>
> TMPSQL = 'SELECT GEN_ID(GEN_' || TABLENAME || '_ID,1) FROM
RDB$DATABASE INTO
> :newid';
>
>
>
> --
> Nick