Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Error : ora-01403 : no data found

GoldrayAug 21 2017 — edited Aug 22 2017

Hi,

I'm using Oracle Forms & DB 10g

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('Le N° Décision doit être saisi.');

  GO_ITEM('OFFER.NUMOFF');

  RAISE form_trigger_failure;

ELSIF :OFFER.FIRSTDAT IS NULL THEN

  MESSAGE('La date d''effet doit être saisie.');

  GO_ITEM('OFFER.FIRSTDAT');

  RAISE form_trigger_failure;

ELSIF :OFFER.LASTDAT IS NULL THEN

  MESSAGE('La date fin de validité doit être saisie.');

  GO_ITEM('OFFER.LASTDAT');

  RAISE form_trigger_failure;

ELSIF :OFFER.NATUREOFF IS NULL THEN

  MESSAGE('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('Insertion on offer table (no data): '||SQLCODE||' - '||SQLERRM);

    raise FORM_TRIGGER_FAILURE;

  WHEN OTHERS THEN

  message('Insertion on offer table (others) : '||SQLCODE||' - '||SQLERRM);

    raise FORM_TRIGGER_FAILURE;

  END;

  :system.message_level := 25;

  COMMIT;

  :system.message_level := 0;

  message(:system.form_status); -- RETURN "QUERY"

  message(DBMS_ERROR_CODE || DBMS_ERROR_TEXT); -- RETURN ORA-01403 no data found

  GO_BLOCK('OFFER');

  clear_block(no_validate);

  Message('Offer is saved');

END;

Thanks in advance.

Ce message a été modifié par : Goldray to simplify the example

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 19 2017
Added on Aug 21 2017
4 comments
1,481 views