comp.lang.ada
 help / color / mirror / Atom feed
* EXCEPTION_WHEN_OTHERS
@ 2007-01-09 13:33 Chris
  2007-01-09 14:45 ` EXCEPTION_WHEN_OTHERS Jason King
  2007-01-10 10:41 ` EXCEPTION_WHEN_OTHERS Alex R. Mosteo
  0 siblings, 2 replies; 3+ messages in thread
From: Chris @ 2007-01-09 13:33 UTC (permalink / 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




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-01-10 10:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-09 13:33 EXCEPTION_WHEN_OTHERS Chris
2007-01-09 14:45 ` EXCEPTION_WHEN_OTHERS Jason King
2007-01-10 10:41 ` EXCEPTION_WHEN_OTHERS Alex R. Mosteo

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