Subject Re: [firebird-support] Why IN AUTONOMOUS TRANSACTION doesnt work here?
Author Mark Rotteveel
On 18-9-2013 22:12, W O wrote:
> In the trigger EMPLEADOS_BIU is the sentence "INSERT INTO ERRORES..."
> but a row is inserted into the table ERRORES only if there are no errors.
>
> This works fine:
>
> INSERT INTO EMPLEADOS (EMP_NOMBRE, EMP_APELLD) VALUES ('JUAN', 'PEREZ');
>
> but it doesnt work:
>
> INSERT INTO EMPLEADOS (EMP_NOMBRE, EMP_APELLD) VALUES
> ('JUAN5678901234567890123', 'PEREZ');
>
> because the length of EMP_NOMBRE is greater than 20, but:
>
> Why is not a row inserted into the table ERRORES?

The statement probably never gets executed at all because it already
fails when the parameter values are checked and deemed too long.

Mark
--
Mark Rotteveel