how to delete a record from a form
551190Dec 13 2006 — edited Dec 14 2006Hello!
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.