Subject | Re: [firebird-support] Set generator in execute block |
---|---|
Author | Thomas Steinmaurer |
Post date | 2012-02-08T19:15:29Z |
> When trying to execute the following it produces an error:This is expected for DDL statements in PSQL.
>
> SET TERM ^ ;
>
> EXECUTE BLOCK
> AS
> DECLARE VARIABLE vMaxID BIGINT;
> BEGIN
> SELECT MAX(ID) FROM A_TABLE
> INTO :vMaxID;
>
> SET GENERATOR GEN_A_TABLE_ID TO :vMaxID;
> END
>
> SET TERM ; ^
>
> the error being
>
> Engine Code : 335544569
> Engine Message :
> Dynamic SQL Error
> SQL error code = -104
> Token unknown - line 10, column 3
> SET
> I have tried wrapping it in an EXECUTE STATEMENT block to the same effect.This should work. What error message do you get here?
--
With regards,
Thomas Steinmaurer (^TS^)
Firebird Technology Evangelist
http://www.upscene.com/
http://www.firebirdsql.org/en/firebird-foundation/