From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d721ab90148a4f76,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!m30g2000cwm.googlegroups.com!not-for-mail From: "Chris" Newsgroups: comp.lang.ada Subject: EXCEPTION_WHEN_OTHERS Date: 9 Jan 2007 05:33:32 -0800 Organization: http://groups.google.com Message-ID: <1168349612.603238.225860@m30g2000cwm.googlegroups.com> NNTP-Posting-Host: 137.44.63.11 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1168349620 6645 127.0.0.1 (9 Jan 2007 13:33:40 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 9 Jan 2007 13:33:40 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Hotbar4.5.3.0; InfoPath.1; .NET CLR 2.0.50727; IEMB3; IEMB3),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: m30g2000cwm.googlegroups.com; posting-host=137.44.63.11; posting-account=B1kXPg0AAACcyvZPQdJ12VB0wAL0eSgX Xref: g2news2.google.com comp.lang.ada:8099 Date: 2007-01-09T05:33:32-08:00 List-Id: Hi, Could someone please help me with regards to a problem I am having with some PL/SQL code. The code is: if :contract.old_contract IS NOT NULL AND :contract.new_contract IS NOT NULL THEN BEGIN UPDATE contracts SET contract_no = :contract.new_contract WHERE contract_no = :contract.old_contract; EXCEPTION WHEN OTHERS THEN message ('update has failed'); END; END IF; As you can see I have a message saying 'update failed' when there is an exception i.e. when the save fails. This works fine as does the rest of the code. What I need however is a way of getting a message 'save was successful' when there are no exceptions. Any help would be great. Thanks Chris