comp.lang.ada
 help / color / mirror / Atom feed
From: "Chris" <c.p.cash@swansea.ac.uk>
Subject: EXCEPTION_WHEN_OTHERS
Date: 9 Jan 2007 05:33:32 -0800
Date: 2007-01-09T05:33:32-08:00	[thread overview]
Message-ID: <1168349612.603238.225860@m30g2000cwm.googlegroups.com> (raw)

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




             reply	other threads:[~2007-01-09 13:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-09 13:33 Chris [this message]
2007-01-09 14:45 ` EXCEPTION_WHEN_OTHERS Jason King
2007-01-10 10:41 ` EXCEPTION_WHEN_OTHERS Alex R. Mosteo
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox