Subject Activate all indexes
Author

 I used script in FlameRobbin to activate all indexes successfully:

SET TERM !! ;

EXECUTE BLOCK AS
DECLARE VARIABLE stmt VARCHAR(1000);
BEGIN
for select 'ALTER INDEX '||rdb$index_name ||' ACTIVE;'
from rdb$indices
where (rdb$system_flag is null or rdb$system_flag = 0)
order by rdb$foreign_key nulls first
into :stmt
do EXECUTE STATEMENT :stmt;
END!!

SET TERM ; !!


In Delphi I added the same script to FDScript5.TFDSQLScripts[0] and called:
    try
      FDScript5.ValidateAll;
      FDScript5.ExecuteAll;
      ShowMessage((Sender As TButton).Caption + ' executed successfully');
    except
      raise;
    end;

No exception raised but indexes are not activated! What is wrong? How can I activate all indexes correctly?


Thanks, Fred