Error Running a Firebird Trigger

1

I have the following Trigger generated in my database:

SET TERM ^ ;



CREATE OR ALTER TRIGGER ATUALIZA_CODNCM FOR EST_ADICIONAIS
ACTIVE BEFORE INSERT OR UPDATE POSITION 0
AS
begin
UPDATE est_adicionais

set id_ncm = (select ncm.id from est_adicionais inner join ncm on
                            (est_adicionais.ncm = ncm.numero)
                            where est_adicionais.ncm = new.ncm and est_adicionais.codigo = new.codigo)
                            where codigo = new.codigo;

end
^


SET TERM ; ^

Except when executing the command below, have the following output:

update est_adicionais e set e.st = '010' WHERE e.codigo = 135;

Output:

Invalid token.
invalid request BLR at offset 258.
function HASHMD5 is not defined.
module name or entrypoint could not be found.

By running the Select and Update commands separately, the 2 run without any problems.

    
asked by anonymous 04.11.2014 / 17:04

1 answer

1

The problem was due to Firebird installed on the computer being corrupted missing UDF HASHMD5, so in case you need to execute it accused the lack of such an add-on.

To fix the problem, remove the Firebird components and re-install it.

    
11.11.2014 / 11:29