Subject Re: [firebird-support] Initializing Generators in Stored Procs
Author Martijn Tonies
Hi Ivan,

> > From: "Martijn Tonies"
> > > CREATE PROCEDURE INITIALIZE_TRANSTYPES
> > > AS
> > > BEGIN
> > > SET GENERATOR "GEN_TXNTYPE" TO 0;
> > > END
> ...
> > DDL isn't allowed in Firebird.
>
> Why do you think SET GENERATOR is DDL command ?

Because it is defined as such :-)

> (Neither of SET GENERATOR, SET NAMES, SET STATISTICS, SET TRANSACTION
> is DDL, imho)

SET NAMES has nothing to do with changing a schema object.

SET TRANSACTION same here, nevertheless, it cannot be used.

SET STATISTICS - updates the stats for a schema (index) object, so yes -
DDL.

SET GENERATOR - updates the value of a schema (generator) object, so yes -
DDL.


With regards,

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