TIBCScript, execute block and execute statement
Posted: Mon 13 Oct 2014 16:08
Hello,
I would like to execute script to alter a primary key of my firebird 2.5 database like :
http://www.firebirdfaq.org/faq176/
It's work like a charm using a SQL command like Flamerobin "execute SQL Statement".
But it's doesn't work with TIBCScript. I have tried a lot of ways.
It is like this component ignore the content of parameter "execute statement" !
So it's doesn't execute the ALTER command...
Any idea ?
Best regards,
Fabrice
I would like to execute script to alter a primary key of my firebird 2.5 database like :
http://www.firebirdfaq.org/faq176/
Code: Select all
EXECUTE BLOCK RETURNS (stmt VARCHAR(1000)) AS
BEGIN
FOR
select 'alter table '||r.rdb$relation_name ||' drop constraint '||r.rdb$constraint_name||';'
from rdb$relation_constraints r
where (r.rdb$constraint_type='PRIMARY KEY')
into :stmt
DO begin suspend; execute statement :stmt; end
ENDBut it's doesn't work with TIBCScript. I have tried a lot of ways.
It is like this component ignore the content of parameter "execute statement" !
So it's doesn't execute the ALTER command...
Any idea ?
Best regards,
Fabrice