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.

sp_SignalEvent

3 posts in Trigger Last posting was on 2012-01-29 23:11:44.0Z
FAP Posted on 2012-01-26 23:12:06.0Z
Date: Fri, 27 Jan 2012 08:12:06 +0900
From: FAP <vichezzz@yahoo.com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1
MIME-Version: 1.0
Newsgroups: Advantage.Trigger
Subject: sp_SignalEvent
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 124.107.6.13
Message-ID: <4f21eba4$1@solutions.advantagedatabase.com>
X-Trace: 26 Jan 2012 16:11:16 -0700, 124.107.6.13
Lines: 6
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.Trigger:506
Article PK: 1136567

Dear All,

How can I send Primary Key (field) Data?

Kind Regards,
Frances


Joachim Duerr (ADS) Posted on 2012-01-27 07:43:30.0Z
From: "Joachim Duerr (ADS)" <jojo.duerr@gmx.de>
Subject: Re: sp_SignalEvent
Newsgroups: Advantage.Trigger
References: <4f21eba4$1@solutions.advantagedatabase.com>
Date: Fri, 27 Jan 2012 08:43:30 +0100
User-Agent: XanaNews/1.19.1.269
X-Face: u2p+</,mb|Ah!x!/qxX5q0t:O~.<1&JzwNHYhSqcviY{~&|iDc"U.Je1A.ZeHR`d;;y#R
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: 10.29.66.149
Message-ID: <4f225526$1@solutions.advantagedatabase.com>
X-Trace: 26 Jan 2012 23:41:26 -0700, 10.29.66.149
Lines: 34
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.Trigger:507
Article PK: 1136568


FAP wrote:

>How can I send Primary Key (field) Data?

with V10 and newer you can send a string along with the message.
There's an example in the help file how you can send the (unique) RowId
of the record that fired the trigger:

http://devzone.advantagedatabase.com/dz/WebHelp/Advantage10.1/index.html?master_sp_signalevent.htm


CREATE TRIGGER [UpdateCustomer]
ON CUSTOMER
AFTER UPDATE
BEGIN
// Pass the ROWID from the updated table to the event
EXECUTE PROCEDURE sp_SignalEvent( ?my_event?, false, 0,
::stmt.TrigRowID );
END;

I usually send an event with the table name and then send the rodid as
additional information:

EXECUTE PROCEDURE sp_SignalEvent(
::stmt.TrigTableName, -- event name
true, -- wait for commit
0, -- options, reserved for future enhancements
::stmt.TrigRowID -- any string data
);

--
Joachim Duerr, Advantage Presales
*** NEW *** Advantage Pocket Guide released *** NEW ***
http://pocketguide.jd-engineering.de


FAP Posted on 2012-01-29 23:11:44.0Z
Date: Mon, 30 Jan 2012 08:11:44 +0900
From: FAP <vichezzz@yahoo.com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1
MIME-Version: 1.0
Newsgroups: Advantage.Trigger
Subject: Re: sp_SignalEvent
References: <4f21eba4$1@solutions.advantagedatabase.com> <4f225526$1@solutions.advantagedatabase.com>
In-Reply-To: <4f225526$1@solutions.advantagedatabase.com>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: 124.107.6.13
Message-ID: <4f25e004$1@solutions.advantagedatabase.com>
X-Trace: 29 Jan 2012 16:10:44 -0700, 124.107.6.13
Lines: 37
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.Trigger:508
Article PK: 1136569

Dear Joachim,

Thanks for the very helpful reply.

On 1/27/2012 4:43 PM, Joachim Duerr (ADS) wrote:
> FAP wrote:
>
>> How can I send Primary Key (field) Data?
>
> with V10 and newer you can send a string along with the message.
> There's an example in the help file how you can send the (unique) RowId
> of the record that fired the trigger:
>
> http://devzone.advantagedatabase.com/dz/WebHelp/Advantage10.1/index.html?master_sp_signalevent.htm
>
>
> CREATE TRIGGER [UpdateCustomer]
> ON CUSTOMER
> AFTER UPDATE
> BEGIN
> // Pass the ROWID from the updated table to the event
> EXECUTE PROCEDURE sp_SignalEvent( ?my_event?, false, 0,
> ::stmt.TrigRowID );
> END;
>
> I usually send an event with the table name and then send the rodid as
> additional information:
>
> EXECUTE PROCEDURE sp_SignalEvent(
> ::stmt.TrigTableName, -- event name
> true, -- wait for commit
> 0, -- options, reserved for future enhancements
> ::stmt.TrigRowID -- any string data
> );
>