Subject Re: [firebird-support] Re: Triggers on table MON$ATTACHMENTS (Solved)
Author Ismael L. Donis Garcia
>----- Original Message -----
>From: hvlad@... [firebird-support]
>To: firebird-support@yahoogroups.com
>Sent: Tuesday, July 12, 2016 3:40 PM
>Subject: [firebird-support] Re: Triggers on table MON$ATTACHMENTS
>
>> ---In firebird-support@yahoogroups.com, <slibre@...> wrote :
>>
>> I can create triggers in the MON$ATTACHMENTS table?
>
> No
>
>> I use Firebird 2.5.6 with flamerobin
>>
>> I want to do something like "After Delete"
>> delete from table1 where con = old.MON$ATTACHMENT_ID
>
> RTFM: Database triggers
>
>http://www.firebirdsql.org/file/documentation/reference_manuals/fblangref25-en/html/fblangref25-ddl->trgr.html#fblangref25-ddl-trgr-dbtrigger

SET TERM ^ ;
CREATE TRIGGER CONNECT_TR ACTIVE
ON CONNECT POSITION 0
AS
BEGIN
/* Trigger para validar usuarios activos del sistema */
delete from sccon where conec not in (select a.MON$ATTACHMENT_ID from
MON$ATTACHMENTS a);
END^
SET TERM ; ^

Best Regards
========
| ISMAEL |
========