Home » Developer & Programmer » Forms » The cause of ora-01403 no data found error (Oracle Forms & DB 10g, xp sp3)
The cause of ora-01403 no data found error [message #665116] Tue, 22 August 2017 03:56 Go to next message
goldray
Messages: 108
Registered: December 2012
Senior Member
Hi,

I had a not based block nammed "offer". when I pressed the save button, the insertion is performed but I encourted ora-01403 no data found error. I want to know the cause of this error in my case.
I had only one trigger on the save button : when-button-pressed

BEGIN
IF :OFFER.NUMOFF IS NULL THEN
  MESSAGE_AUTORIS('Le N° Décision doit être saisi.');
  GO_ITEM('OFFER.NUMOFF');
  RAISE form_trigger_failure;
ELSIF :OFFER.FIRSTDAT IS NULL THEN
  MESSAGE_AUTORIS('La date d''effet doit être saisie.');
  GO_ITEM('OFFER.FIRSTDAT');
  RAISE form_trigger_failure;
ELSIF :OFFER.LASTDAT IS NULL THEN
  MESSAGE_AUTORIS('La date fin de validité doit être saisie.');
  GO_ITEM('OFFER.LASTDAT');
  RAISE form_trigger_failure;
ELSIF :OFFER.NATUREOFF IS NULL THEN
  MESSAGE_AUTORIS('Le code en douane du bénéficiaire doit être saisi.');
  GO_ITEM('OFFER.NATUREOFF');
  RAISE form_trigger_failure;

END IF;
			
  BEGIN
  	
  	:system.message_level := 25;  
	insert into OFFER
	(NUMOFF, FIRSTDAT, LASTDAT, NATUREOFF)
	values (:OFFER.NUMOFF, :OFFER.FIRSTDAT, :OFFER.LASTDAT, :OFFER.NATUREOFF); 
	system.message_level := 0;
  EXCEPTION	
  	WHEN no_data_found THEN
  	 	message_autoris('Insertion on offer table (no data): '||SQLCODE||' - '||SQLERRM);
    	raise FORM_TRIGGER_FAILURE;
  	WHEN OTHERS THEN
 		message_autoris('Insertion on offer table (others) : '||SQLCODE||' - '||SQLERRM);
    raise FORM_TRIGGER_FAILURE;
	END;
	
  :system.message_level := 25;
  COMMIT;
  :system.message_level := 0;
  message_autoris(:system.form_status); -- RETURN "QUERY"
  message_autoris(DBMS_ERROR_CODE || DBMS_ERROR_TEXT); -- RETURN ORA-01403 no data found
  GO_BLOCK('OFFER');
  clear_block(no_validate);
  Message_autoris('Offer is saved');

END;

Thanks in advance.
Best regards.



CM: removed a load of blank space at the end

[Updated on: Tue, 22 August 2017 04:12] by Moderator

Report message to a moderator

Re: The cause of ora-01403 no data found error [message #665118 is a reply to message #665116] Tue, 22 August 2017 04:14 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
Well there is absolutely nothing in there that can raise no_data_found - including the code in the inner block, so really no idea why you've coded a no_data_found exception handler there.
However you're calling a custom procedure - Message_autoris - so what does that do?
Re: The cause of ora-01403 no data found error [message #665119 is a reply to message #665118] Tue, 22 August 2017 04:34 Go to previous messageGo to next message
goldray
Messages: 108
Registered: December 2012
Senior Member
Its just an alert message.
I added a trigger to the "offer" block : when-new-block-instance
message(:system.cursor_item ||'--'||DBMS_ERROR_CODE || DBMS_ERROR_TEXT); -- RETURN OFFER.NUMOFF--ORA-01403 no data found
Re: The cause of ora-01403 no data found error [message #665122 is a reply to message #665119] Tue, 22 August 2017 05:24 Go to previous message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
Again the code you posted can't throw that error. It'll be one of:
1) a DB trigger on the table
2) That procedure you're calling that you don't want to post the code for
3) Some other trigger in the form that's getting fired - possibly as a result of the go_item or go_block.

Try running the form in debug mode.
Previous Topic: Trying to get data in Excel sheet from Oracle reports 10g
Next Topic: Not able to fire ON-COMMIT
Goto Forum:
  


Current Time: Thu Mar 28 08:05:26 CDT 2024