Subject | Re: [Firebird-general] possible to CREATE a TRIGGER from a INSIDE? |
---|---|
Author | Martijn Tonies |
Post date | 2005-10-27T11:34:40Z |
Hi,
not by Firebird.
know
to which error we can apply the solution?
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com
> I'm trying to create a new trigger from INSIDE the database, trhough aDon't do that. SET TERM is only needed by client applications,
> procedure using the EXECUTE STATEMENT
>
> I create a string with all the syntax (really only a command)
>
> trg=
> 'SET TERM ^ ; '||
not by Firebird.
> 'CREATE TRIGGER '||new.table||' for '||NEW.table||' '||Remove the "^".
> 'AFTER '||CASE new.accion when 'A' then 'INSERT'
> when 'M' then 'UPDATE'
> when 'B' then 'DELETE' end||' '||
> 'POSITION 100 '||
> 'AS BEGIN '||
> 'EXECUTE PROCEDURE MY_PROCEDURE; '
> 'END ^ '||
> 'SET TERM ; ^ 'Remove this.
> but when I tryOh? Well, luckily, we have some kind of solution... That is, care to let us
>
> EXECUTE STATEMENT trg
>
> i got some kind of error
know
to which error we can apply the solution?
> I try whithout "set term" comamnd but same result...With regards,
>
> anyone know the way to DO it?
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com