By the same reasons already discussed for external languages implementation, EXECUTE STATEMENT doesn't work in CONNECT / TRANSACTION START triggers.
isql -term !
Use CONNECT or CREATE DATABASE to specify a database
SQL> create database 't.fdb'!
SQL> create trigger t_connect on connect as
CON> declare v integer;
CON> begin
CON> execute statement 'select 1 from rdb$database' into v;
CON> end!
isql t.fdb
Statement failed, SQLCODE = -904
invalid database handle (no active connection)
-At trigger 'T_CONNECT' line: 4, col: 3
Use CONNECT or CREATE DATABASE to specify a database
Description
By the same reasons already discussed for external languages implementation, EXECUTE STATEMENT doesn't work in CONNECT / TRANSACTION START triggers.
isql -term !
Use CONNECT or CREATE DATABASE to specify a database
SQL> create database 't.fdb'!
SQL> create trigger t_connect on connect as
CON> declare v integer;
CON> begin
CON> execute statement 'select 1 from rdb$database' into v;
CON> end!
isql t.fdb
Statement failed, SQLCODE = -904
invalid database handle (no active connection)
-At trigger 'T_CONNECT' line: 4, col: 3
Use CONNECT or CREATE DATABASE to specify a database