Subject Re: [firebird-support] FB-1.5.2 SP error in execute statement
Author Dimitry Sibiryakov
On 8 Feb 2005 at 19:07, intellekta wrote:

>can anybody tell me why this statement works
>
>SELECT GEN_ID(GEN_MYTABLE_ID, 1) AS NID FROM RDB$DATABASE INTO NEWID;
>
>but this not ?
>
>SQL = 'SELECT GEN_ID(GEN_MYTABLE_ID, 1) AS NID FROM RDB$DATABASE';
>EXECUTE STATEMENT SQL INTO NEWID;

Because SELECT perform typecast from BIGINT to INTEGER while
EXECUTE STATEMENT doesn't do this.
AFAIR it was done for better security.
--
SY, Dimitry Sibiryakov.