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.

Unable to reference __error table in BEFORE UPDATE trigger

4 posts in Trigger Last posting was on 2006-04-24 22:57:03.0Z
AP Digital Posted on 2006-04-24 20:49:24.0Z
From: "AP Digital" <jschatte@comcast.net>
Newsgroups: advantage.trigger
Subject: Unable to reference __error table in BEFORE UPDATE trigger
Date: Mon, 24 Apr 2006 16:49:24 -0400
Lines: 28
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 216.24.163.116
Message-ID: <444d387e@solutions.advantagedatabase.com>
X-Trace: 24 Apr 2006 14:43:42 -0700, 216.24.163.116
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!216.24.163.116
Xref: solutions.advantagedatabase.com Advantage.Trigger:220
Article PK: 1136285

I am trying to insert an error message into the __error table in a BEFORE
UPDATE trigger on my inventory item table, but I am getting the following
error when I verify syntax:

Error 7041: File not found. Verify the specified path and file name is
correct. Table name: __error

Here is the BEFORE UPDATE trigger SQL (the business case here is to raise an
error if you attempt to transfer an inventory item that belongs to an
unprocessed order detail):

INSERT INTO __error
SELECT 5500, 'The rx can not be transferred because it belongs to one or
more open orders.'
FROM __old a, __new b, ORDERDETAIL c
WHERE a.ITEMID = b.ITEMID
AND a.TRANSFERRED = 'N'
AND b.TRANSFERRED = 'Y'
AND c.ITEMID = b.ITEMID
AND c.PROCESSED = 'N'

Should I be able to reference the __error table when creating a trigger with
SQL?

Thanks,
Jamie


AP Digital Posted on 2006-04-24 20:54:44.0Z
From: "AP Digital" <jschatte@comcast.net>
Newsgroups: advantage.trigger
References: <444d387e@solutions.advantagedatabase.com>
Subject: Re: Unable to reference __error table in BEFORE UPDATE trigger
Date: Mon, 24 Apr 2006 16:54:44 -0400
Lines: 10
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 216.24.163.116
Message-ID: <444d39c2@solutions.advantagedatabase.com>
X-Trace: 24 Apr 2006 14:49:06 -0700, 216.24.163.116
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!216.24.163.116
Xref: solutions.advantagedatabase.com Advantage.Trigger:221
Article PK: 1136287

Well, I created the trigger anyway even though it failed syntax validation
and the trigger actually seems to work as desired. This appears to be a
problem with the sytax verification when created the trigger in data
Architect. Also, sorry I forgot to mention the ADS version in my previous
post (it is version 7.10.0.0).

Thanks again,
Jamie


Jeremy Mullin Posted on 2006-04-24 22:57:03.0Z
Date: Mon, 24 Apr 2006 22:57:03 +0000 (UTC)
Message-ID: <886edc1511fd38c835d73f12f21f@devzone.advantagedatabase.com>
From: Jeremy Mullin <no@email.com>
Subject: Re: Unable to reference __error table in BEFORE UPDATE trigger
Newsgroups: Advantage.Trigger
References: <444d39c2@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 928.2
NNTP-Posting-Host: 198.102.102.44
X-Trace: 24 Apr 2006 16:53:37 -0700, 198.102.102.44
Lines: 16
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!198.102.102.44
Xref: solutions.advantagedatabase.com Advantage.Trigger:223
Article PK: 1136288

I should clarify. The bug is in arc in the script verification, not in the
trigger or server.

J.D. Mullin
Advantage R&D

> Well, I created the trigger anyway even though it failed syntax
> validation and the trigger actually seems to work as desired. This
> appears to be a problem with the sytax verification when created the
> trigger in data Architect. Also, sorry I forgot to mention the ADS
> version in my previous post (it is version 7.10.0.0).
>
> Thanks again,
> Jamie


Jeremy Mullin Posted on 2006-04-24 22:56:26.0Z
Date: Mon, 24 Apr 2006 22:56:26 +0000 (UTC)
Message-ID: <886edc1511fd28c835d728bb35fb@devzone.advantagedatabase.com>
From: Jeremy Mullin <no@email.com>
Subject: Re: Unable to reference __error table in BEFORE UPDATE trigger
Newsgroups: Advantage.Trigger
References: <444d39c2@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 928.2
NNTP-Posting-Host: 198.102.102.44
X-Trace: 24 Apr 2006 16:53:00 -0700, 198.102.102.44
Lines: 17
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!198.102.102.44
Xref: solutions.advantagedatabase.com Advantage.Trigger:222
Article PK: 1136289

Thanks Jamie,

I think this is a bug. I'll enter it into our bug database.

J.D. Mullin
Advantage R&D

> Well, I created the trigger anyway even though it failed syntax
> validation and the trigger actually seems to work as desired. This
> appears to be a problem with the sytax verification when created the
> trigger in data Architect. Also, sorry I forgot to mention the ADS
> version in my previous post (it is version 7.10.0.0).
>
> Thanks again,
> Jamie