Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Martin Berns — — source: Informix-list mailing list archive (1991-1998)
Sergei Gringauze schrieb:
>
> Hi,
>
> I experience some problem with DELETE ON
> trigger creation. The trigger I try to define is as follows:
>
> CREATE TRIGGER real_del_ses DELETE ON sessions_s
> REFERENCING OLD AS pre
> FOR EACH ROW
> (UPDATE visits SET numOfSessions=numOfSessions-1
> WHERE machineId=pre.visitId_machineId AND> index=pre.visitId_index);
>
> and the error I receive is:
>
> [Informix][OnLine Workgroup Server][mvdb] SQL Error (-742) : Trigger and
> referential constraint cannot co-exist.
>
> Can anyone help me?
Hi Sergei,
it seems to me, that you have a foreign key constraint with delete
cascade referencing table session_s. A workaround may be, to delete the depending rows in other
tables via trigger real_del_ses, too.
hth
martin
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.