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.

Error with Trigger when calling sp_SignalEvent

3 posts in Trigger Last posting was on 2009-07-13 16:23:40.0Z
AlexK Posted on 2009-07-06 15:35:01.0Z
Reply-To: "AlexK" <alex@formushare.com>
From: "AlexK" <alex@formushare.com>
Newsgroups: advantage.trigger
Subject: Error with Trigger when calling sp_SignalEvent
Date: Mon, 6 Jul 2009 10:35:01 -0500
Lines: 22
Organization: FUS Support, Inc.
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6001.18000
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049
NNTP-Posting-Host: 74.95.48.89
Message-ID: <4a521968@solutions.advantagedatabase.com>
X-Trace: 6 Jul 2009 09:34:00 -0700, 74.95.48.89
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!74.95.48.89
Xref: solutions.advantagedatabase.com Advantage.Trigger:444
Article PK: 1136504

I have a trigger added to a table called REMOTE on AFTER INSERT.

The trigger code is:
UPDATE REMOTE SET TRIGGERED=TRUE WHERE TRIGGERED=FALSE;
EXECUTE PROCEDURE sp_SignalEvent('RemoteInsert', true, 0 );

I have called (in seperate SQL scripts) prior to inserting a record:
EXECUTE PROCEDURE sp_CreateEvent('RemoteInsert', 0 );
then
EXECUTE PROCEDURE sp_WaitForEvent('RemoteInsert',5000, 0, 0 );

the sp_WaitForEvent returns 0 for the count. When I run the following
script:
INSERT INTO REMOTE VALUES('001','0','1001T2',0,'Me',4,0,1,True);
I get this error:
poQuery: Error 7200: AQE Error: State = HY000; NativeError = 5177;
[iAnywhere Solutions][Advantage SQL][ASA] Error 5177: Trigger execution
failed. Error 7200: AQE Error: State = S0000; NativeError = 2121;
[iAnywhere Solutions][Advantage SQL Engine]Column not found: 'RemoteInsert -- Location of error in the SQL statement is: 90 (line: 2 column: 34)

Help, please?


AlexK Posted on 2009-07-06 15:39:21.0Z
Reply-To: "AlexK" <alex@formushare.com>
From: "AlexK" <alex@formushare.com>
Newsgroups: advantage.trigger
References: <4a521968@solutions.advantagedatabase.com>
In-Reply-To: <4a521968@solutions.advantagedatabase.com>
Subject: Re: Error with Trigger when calling sp_SignalEvent
Date: Mon, 6 Jul 2009 10:39:21 -0500
Lines: 41
Organization: FUS Support, Inc.
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6001.18000
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049
NNTP-Posting-Host: 74.95.48.89
Message-ID: <4a521a71@solutions.advantagedatabase.com>
X-Trace: 6 Jul 2009 09:38:25 -0700, 74.95.48.89
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!74.95.48.89
Xref: solutions.advantagedatabase.com Advantage.Trigger:445
Article PK: 1136507

Also, here is the SQL script that creates the trigger:
CREATE TRIGGER [trRemoteBatch]
ON REMOTE
AFTER INSERT
BEGIN
UPDATE REMOTE SET TRIGGERED=TRUE WHERE TRIGGERED=FALSE;
EXECUTE PROCEDURE sp_SignalEvent( 'RemoteInsert', true, 0 );
END;

The UPDATE REMOTE... line I added as a test. If I remove the sp_SignalEvent
the trigger fires just fine. With the sp_SignalEvent, however, I receive
the aforementioned error.

"AlexK" <alex@formushare.com> wrote in message
news:4a521968@solutions.advantagedatabase.com...
>I have a trigger added to a table called REMOTE on AFTER INSERT.
>
> The trigger code is:
> UPDATE REMOTE SET TRIGGERED=TRUE WHERE TRIGGERED=FALSE;
> EXECUTE PROCEDURE sp_SignalEvent('RemoteInsert', true, 0 );
>
> I have called (in seperate SQL scripts) prior to inserting a record:
> EXECUTE PROCEDURE sp_CreateEvent('RemoteInsert', 0 );
> then
> EXECUTE PROCEDURE sp_WaitForEvent('RemoteInsert',5000, 0, 0 );
>
> the sp_WaitForEvent returns 0 for the count. When I run the following
> script:
> INSERT INTO REMOTE VALUES('001','0','1001T2',0,'Me',4,0,1,True);
> I get this error:
> poQuery: Error 7200: AQE Error: State = HY000; NativeError = 5177;
> [iAnywhere Solutions][Advantage SQL][ASA] Error 5177: Trigger execution
> failed. Error 7200: AQE Error: State = S0000; NativeError = 2121;
> [iAnywhere Solutions][Advantage SQL Engine]Column not found:
> 'RemoteInsert -- Location of error in the SQL statement is: 90 (line: 2
> column: 34)
>
> Help, please?


Edgar Sherman Posted on 2009-07-13 16:23:40.0Z
Date: Mon, 13 Jul 2009 10:23:40 -0600
From: Edgar Sherman <no@email.com>
User-Agent: Thunderbird 2.0.0.22 (Windows/20090605)
MIME-Version: 1.0
Newsgroups: advantage.trigger
Subject: Re: Error with Trigger when calling sp_SignalEvent
References: <4a521968@solutions.advantagedatabase.com> <4a521a71@solutions.advantagedatabase.com>
In-Reply-To: <4a521a71@solutions.advantagedatabase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 10.24.34.164
Message-ID: <4a5b5f3d@solutions.advantagedatabase.com>
X-Trace: 13 Jul 2009 10:22:21 -0700, 10.24.34.164
Lines: 50
X-Authenticated-User: upreview
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!10.24.34.164
Xref: solutions.advantagedatabase.com Advantage.Trigger:446
Article PK: 1136506

Hmm, odd. I gave this a try (using the same table and trigger name) and
was not able to duplicate it using the latest 9.1 server. Have you had
any luck on a different table or by dropping/recreating the trigger? Be
sure to close all open instances of the table after modifying the
trigger to get the latest changes.

Edgar

AlexK wrote:
> Also, here is the SQL script that creates the trigger:
> CREATE TRIGGER [trRemoteBatch]
> ON REMOTE
> AFTER INSERT
> BEGIN
> UPDATE REMOTE SET TRIGGERED=TRUE WHERE TRIGGERED=FALSE;
> EXECUTE PROCEDURE sp_SignalEvent( 'RemoteInsert', true, 0 );
> END;
>
> The UPDATE REMOTE... line I added as a test. If I remove the
> sp_SignalEvent the trigger fires just fine. With the sp_SignalEvent,
> however, I receive the aforementioned error.
>
>
>
> "AlexK" <alex@formushare.com> wrote in message
> news:4a521968@solutions.advantagedatabase.com...
>> I have a trigger added to a table called REMOTE on AFTER INSERT.
>>
>> The trigger code is:
>> UPDATE REMOTE SET TRIGGERED=TRUE WHERE TRIGGERED=FALSE;
>> EXECUTE PROCEDURE sp_SignalEvent('RemoteInsert', true, 0 );
>>
>> I have called (in seperate SQL scripts) prior to inserting a record:
>> EXECUTE PROCEDURE sp_CreateEvent('RemoteInsert', 0 );
>> then
>> EXECUTE PROCEDURE sp_WaitForEvent('RemoteInsert',5000, 0, 0 );
>>
>> the sp_WaitForEvent returns 0 for the count. When I run the following
>> script:
>> INSERT INTO REMOTE VALUES('001','0','1001T2',0,'Me',4,0,1,True);
>> I get this error:
>> poQuery: Error 7200: AQE Error: State = HY000; NativeError = 5177;
>> [iAnywhere Solutions][Advantage SQL][ASA] Error 5177: Trigger
>> execution failed. Error 7200: AQE Error: State = S0000;
>> NativeError = 2121; [iAnywhere Solutions][Advantage SQL Engine]Column
>> not found: 'RemoteInsert -- Location of error in the SQL statement is:
>> 90 (line: 2 column: 34)
>>
>> Help, please?
>