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!

how to delete a record from a form

551190Dec 13 2006 — edited Dec 14 2006
Hello!

I'm trying to delete a record from a table called PETS. The pet name is in a textbox from a data block called DELETE_PET.

So i wrote in the WHEN_BUTTON_PRESSED_TRIGGER of the Delete button:


select PETNAME into p_name from pets where PETNAME = :DELETE_PET.PETNAME;

DELETE from PETS where PETNAME = p_name;

clear_block(NO_VALIDATE);

alert_id := find_alert('PET_DELETED');
choice := Show_ALert(alert_id);

commit;

exception
when NO_DATA_FOUND then
alert_id := find_alert('PET_NOT_FOUND');
choice := Show_ALert(alert_id);
clear_block(NO_VALIDATE);
rollback;
end;



And it's not working!!!!! :( :( :(

Any help would be greatly appreciated!

Thank you.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 11 2007
Added on Dec 13 2006
11 comments
949 views