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.

Trigger events

2 posts in General Discussion Last posting was on 2004-12-02 18:14:12.0Z
Eddie Sizemore Posted on 2004-12-02 18:09:46.0Z
From: "Eddie Sizemore" <esizemoreno@spamqx.net>
Newsgroups: ianywhere.public.general
Subject: Trigger events
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-Original-NNTP-Posting-Host: 12-202-247-63.client.insightbb.com
Message-ID: <41af5a66$1@forums-2-dub>
X-Original-Trace: 2 Dec 2004 10:09:42 -0800, 12-202-247-63.client.insightbb.com
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 2 Dec 2004 10:09:43 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 2 Dec 2004 10:09:46 -0800
X-Trace: forums-1-dub 1102010986 10.22.108.75 (2 Dec 2004 10:09:46 -0800)
X-Original-Trace: 2 Dec 2004 10:09:46 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:3927
Article PK: 7819

Using ASA Anywhere 7.0.4.2788

I have a trigger and I need to know if the trigger was fired because of an
insert, update, or delete. The trigger is defined to fire on all three
events.

I use the following script in a ver 9 db but I can't get it to work with v7.

if inserting then
set myAction='A'
elseif deleting then
set myAction='D'
elseif updating then
set myAction='C'
end if;


TIA
Eddie Sizemore


Reg Domaratzki (iAnywhere Solutions) Posted on 2004-12-02 18:14:12.0Z
From: "Reg Domaratzki \(iAnywhere Solutions\)" <Spam_bad_rdomarat@ianywhere.com>
Newsgroups: ianywhere.public.general
References: <41af5a66$1@forums-2-dub>
Subject: Re: Trigger events
Lines: 41
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
X-Original-NNTP-Posting-Host: rdomarat-pc.sybase.com
Message-ID: <41af5b6d$1@forums-2-dub>
X-Original-Trace: 2 Dec 2004 10:14:05 -0800, rdomarat-pc.sybase.com
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 2 Dec 2004 10:14:09 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 2 Dec 2004 10:14:12 -0800
X-Trace: forums-1-dub 1102011252 10.22.108.75 (2 Dec 2004 10:14:12 -0800)
X-Original-Trace: 2 Dec 2004 10:14:12 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:3929
Article PK: 7821

This was a new feature in v802. In v7, you'll need to define three separate
triggers if you really need to know which trigger is firing.

--
Reg Domaratzki, Sybase iAnywhere Solutions
Sybase Certified Professional - Sybase ASA Developer Version 8
Please reply only to the newsgroup

iAnywhere Developer Community : http://www.ianywhere.com/developer
iAnywhere Documentation : http://www.ianywhere.com/developer/product_manuals
ASA Patches and EBFs : http://downloads.sybase.com/swx/sdmain.stm
-> Choose SQL Anywhere Studio
-> Set "Platform Preview" and "Time Frame" to ALL

"Eddie Sizemore" <esizemoreno@spamqx.net> wrote in message
news:41af5a66$1@forums-2-dub...
> Using ASA Anywhere 7.0.4.2788
>
> I have a trigger and I need to know if the trigger was fired because of an
> insert, update, or delete. The trigger is defined to fire on all three
> events.
>
> I use the following script in a ver 9 db but I can't get it to work with
v7.
>
> if inserting then
> set myAction='A'
> elseif deleting then
> set myAction='D'
> elseif updating then
> set myAction='C'
> end if;
>
>
> TIA
> Eddie Sizemore
>
>
>