Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

AfterUpdate trigger does not fire (ADS 7.1)

3 posts in Trigger Last posting was on 2005-11-05 09:37:49.0Z
M. Friedrich Posted on 2005-10-19 17:52:40.0Z
Date: Wed, 19 Oct 2005 19:52:40 +0200
From: "M. Friedrich" <m.friedrich@accurata.com>
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) Hamster/2.1.0.0
X-Accept-Language: de-DE, de, en-us, en
MIME-Version: 1.0
Newsgroups: Advantage.Trigger
Subject: AfterUpdate trigger does not fire (ADS 7.1)
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: 84.245.158.38
Message-ID: <43568a38@solutions.advantagedatabase.com>
X-Trace: 19 Oct 2005 12:02:32 -0700, 84.245.158.38
Lines: 30
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!84.245.158.38
Xref: solutions.advantagedatabase.com Advantage.Trigger:176
Article PK: 1136242

Hi.

My "VER" table has only 2 triggers which should make
a log of any change in that table to another table names
"VSH" :

The AfterInsert trigger fires correctly :

INSERT INTO
vsh (id_ver, id_pvs, datum, zeit, username)
SELECT
id, id_pvs, curdate(), curtime(), user()
FROM
__new;

The AfterUpdate trigger does NOT fire :

INSERT INTO
vsh (id_ver, id_pvs, datum, zeit, username)
SELECT
id, id_pvs, curdate(), curtime(), user()
FROM
__old;

What??s wrong ?? Any hints ?

--
Thanks on any answers
M. Friedrich


Peter Funk (ADS) Posted on 2005-11-04 15:43:52.0Z
Message-ID: <a46fe23612eaf8c7af336af37df5@devzone.advantagedatabase.com>
From: Peter Funk (ADS) <peterf@extendsys.com>
Subject: Re: AfterUpdate trigger does not fire (ADS 7.1)
Newsgroups: Advantage.Trigger
References: <43568a38@solutions.advantagedatabase.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=iso-8859-1; format=flowed
X-Newsreader: JetBrains Omea Reader 671.6
NNTP-Posting-Host: 198.102.102.31
Date: 4 Nov 2005 08:43:52 -0700
X-Trace: 4 Nov 2005 08:43:52 -0700, 198.102.102.31
Lines: 15
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!198.102.102.31
Xref: solutions.advantagedatabase.com Advantage.Trigger:178
Article PK: 1136244

Hello M. Friedrich,
What kind of operation are you doing to fire the triggers? For an INSERT
operation only the AfterInsert trigger will fire. For an UPDATE operation,
only the AfterUpdate trigger will fire. No operation will fire both triggers.

I just setup a data dictionary with two triggers as you described and they
fired as expected. If you're still having problems, please post more information
about what operations you're performing and how you expect the triggers to
behave.

Regards,
Peter Funk
Advantage R&D


M. Friedrich Posted on 2005-11-05 09:37:49.0Z
Date: Sat, 05 Nov 2005 10:37:49 +0100
From: "M. Friedrich" <m.friedrich@accurata.com>
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) Hamster/2.1.0.0
X-Accept-Language: de-DE, de, en-us, en
MIME-Version: 1.0
Newsgroups: Advantage.Trigger
Subject: Re: AfterUpdate trigger does not fire (ADS 7.1)
References: <43568a38@solutions.advantagedatabase.com> <a46fe23612eaf8c7af336af37df5@devzone.advantagedatabase.com>
In-Reply-To: <a46fe23612eaf8c7af336af37df5@devzone.advantagedatabase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 84.245.158.38
Message-ID: <436f38dc@solutions.advantagedatabase.com>
X-Trace: 7 Nov 2005 04:22:04 -0700, 84.245.158.38
Lines: 21
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!84.245.158.38
Xref: solutions.advantagedatabase.com Advantage.Trigger:180
Article PK: 1136245

Peter Funk (ADS) schrieb:

> Hello M. Friedrich,
> What kind of operation are you doing to fire the triggers? For an
> INSERT operation only the AfterInsert trigger will fire. For an UPDATE
> operation, only the AfterUpdate trigger will fire. No operation will
> fire both triggers.
>
> I just setup a data dictionary with two triggers as you described and
> they fired as expected. If you're still having problems, please post
> more information about what operations you're performing and how you
> expect the triggers to behave.
>
> Regards,
> Peter Funk
> Advantage R&D
>
>

Already got the solution. Thanks.

M.F.