Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

no-data-found problem

Status
Not open for further replies.

LimonaM

Programmer
Oct 27, 2004
50
0
0
SI
Hello

I have SQL sentence in my forms. And can get from it two results. 'SA' or nothing. When there is 'SA' i can commit my rows and go to the next record. But when there is nothing i can't commit and i allways find myself in the item so i could write something in. But i mustn't. How can i program so it will commit when it's 'SA' or nothing? There are just those two options and must be commited. How can i get rid of message (with exception) and commit like it's everything normal, like nothing is something too?

Thanks
 
Set the Required property of the item to 'No'.
 
Is there a database constraint or trigger on that field? Can you provide the error message yo get?
 
There is no error, no constraint. It just allways puts me into the item where 'SA' or nothing (null) should be. SQL sentence is in trigger - When-button-pressed. SQL sentence looks if record has 'SA' approved. If it has it writes it in item and then copy this 'SA' to another item and commit. The same should be when 'SA' isn't approved. It should commit without it. There are 2 ways: 'SA' or nothing

When i use Kex-next-item trigger to jump from one item to this item, there is this message:
FRM-40735: KEY-NEXT-ITEM trigger Raised unhandled exception ORA-01403 but it works. But i need when-button-pressed because there are many records and it should work for every record i choose.

that's how i have it - simler version:

when :system.record_status <> 'new' loop

SQL sentence

commit;

end loop;




Thanks

 
So change your key-next-item trigger to process empty field also . I suppose this trigger populates some other item from a lookup table. Wrap the trigger code by

if :your_item is not null then
... the code of trigger

end;

Another even more dirty way is to catch this exception by

when others then null;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top