Home » Developer & Programmer » Forms » Update Alert
icon4.gif  Update Alert [message #661706] Tue, 28 March 2017 21:30 Go to next message
zaibi
Messages: 17
Registered: January 2017
Junior Member
DECLARE
	UPD NUMBER(20);
	B NUMBER(10);
BEGIN
--***************FOR UPDATE ALERT (NOT WORKING THIS BLOCK)**********************************

  SELECT SALE.BILL_NO INTO B FROM SALE WHERE SALE.BILL_NO=:SALE.BILL_NO;
	
	IF 
		:SALE.BILL_NO=B THEN
		UPD:=SHOW_ALERT('UPDATE');
		IF UPD=ALERT_Button1 THEN
	
			--SYSTEM.MESSAGE_LEVEL:=5;
			COMMIT_FORM;
			--SYSTEM.MESSAGE_LEVEL:=25;
		END IF;
--***************FOR UPDATE ALERT (WORKING ACCURATE)**********************************
	ELSIF 
                      :SALE.PRICE IS NULL THEN
                       MESSAGE ('NOT INSERT BECAUSE OF EMPTY FIELD');
                       MESSAGE ('NOT INSERT BECAUSE OF EMPTY FIELD');
        ELSE
                      COMMIT_FORM;
END IF;
END;



Please anyone help me for this working.
Re: Update Alert [message #661709 is a reply to message #661706] Wed, 29 March 2017 01:01 Go to previous messageGo to next message
Michel Cadot
Messages: 67363
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Please feedback and thank people in your previous topics.

Re: Update Alert [message #661719 is a reply to message #661709] Wed, 29 March 2017 04:26 Go to previous messageGo to next message
cookiemonster
Messages: 13894
Registered: September 2008
Location: Rainy Manchester
Senior Member
When a select into doesn't find matching rows in the DB it raises the no_data_found exception.
Consequently your ELSIF and ELSE can never run - since if the IF isn't true you will have got no_data_found.

That said - I'm not sure why you've written any of this code. The ELSIF should be handled by setting the required property on the item, and inserting and updating should probably just be left to default forms behaviour. The user is going to know they're updating a record, because they will have queried it first (and if they haven't you're doing it wrong).
Re: Update Alert [message #661721 is a reply to message #661719] Wed, 29 March 2017 09:32 Go to previous messageGo to next message
zaibi
Messages: 17
Registered: January 2017
Junior Member
Thanks For Reply I solve it by Using Another Method.

And Thanks Michel Feedback me And Sorry For Previous Mesages I Can't Replied Because Of My Internet Connection is Damage. Now That Solved.
Re: Update Alert [message #661723 is a reply to message #661721] Wed, 29 March 2017 10:30 Go to previous messageGo to next message
Michel Cadot
Messages: 67363
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

So now you can review your previous topics and feedback in them.

Re: Update Alert [message #661725 is a reply to message #661723] Wed, 29 March 2017 10:50 Go to previous message
zaibi
Messages: 17
Registered: January 2017
Junior Member
Yes.
Previous Topic: execute_query between two text items
Next Topic: (select count(*) from table) > 0 then
Goto Forum:
  


Current Time: Mon Sep 21 07:17:34 CDT 2020