Subject Re: [firebird-support] Updating generator
Author Martijn Tonies
Hi,

> could I update generator from the stored procedure?
> I tried:
>
> SET TERM !! ;
> CREATE OR ALTER PROCEDURE PT_UpdateGenerators
> AS
> BEGIN
> SET GENERATOR CALLDATA_GEN TO 1;
> END
> !!
> SET TERM ; !!
>
> But isql says:
> Statement failed, SQLCODE = -104
> Dynamic SQL Error
> -SQL error code = -104
> -Token unknown - line 8, char 1
> -set

You cannot do DDL statements inside a procedure, except
with EXECUTE STATEMENT.

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com