RE: DB2 RAISE_ERROR equivalent in IDS
Posted in 2005
Raise exception
Example: (called this from an update trigger)
CREATE PROCEDURE check_paydate(pdate date)
IF pdate is not null or pdate != "" THEN
RAISE EXCEPTION -746, 0, 'Could not update - paydate already has avalue';
END IF
END PROCEDURE;
-746 is the number for a user defined error
(finderr 746)
-----Original Message-----
From: owner-informix-list@iiug.org [mailto:owner-informix-list@iiug.org]
On Behalf Of Manas Dadarkar
Sent: 01 December 2005 09:24 PM
To: informix-list@iiug.org
Subject: DB2 RAISE_ERROR equivalent in IDS
Hi,
I am trying to find out if the DB2 RAISE_ERROR function can be
implemented in IDS. The description of the function from the DB2
documentation is as follows
*The RAISE_ERROR function causes the statement that includes the
function to
return an error with the specified SQLSTATE, SQLCODE -438, and
diagnostic-string.*
**
Any ideas, suggestions welcome.
Thanks in advance.
Regards,
-Manas
sending to informix-list
>
The information on this e-mail including any attachments relates to the official business of DigiCare (Pty) Ltd. The information is confidential and legally privileged and is intended solely for the addressee. Access to this e-mail by anyone else is unauthorised and as such any disclosure, copying, distribution or any action taken or omitted in reliance on it is unlawful. Please notify the sender immediately if it has inadvertently reached you and do not read, disclose or use the content in any way.
>
No responsibility whatsoever is accepted by DigiCare (Pty) Ltd if the information is, for whatever reason, corrupted or does not reach its intended destination. The views expressed in this e-mail are the views of the individual sender and should in no way be construed as the views of DigiCare (Pty) Ltd, except where the sender has specifically stated them to be the views of DigiCare (Pty) Ltd.
sending to informix-list