Hmmm... Do you have ON-ERROR or ON-MESSAGE triggers in that form that might be preventing an error from displaying?
If the property pallette shows the "Database Data Block" set to "Yes" and you delete te record then it should delete it from the form and the database, then on commit make that permanent. Is the record in question, being deleted from the form? Maybe a different record in that block is being deleted.
if :block.key IS NOT NULL THEN
select count(*) into v_nb from emp where no=:block.key;
if v_nb =0 then
if i=alert_button1 then
So let's see....
Your delete_record and commit are nested three levels deep in IF statements. To actually delete a record, you need
1. there MUST be NO rows where emp.no is equal to the value in :Block.key
2. then you Show_alert.
3. IF you click on the first button of the alert,
4. you then delete a record in whatever block the cursor is in.
But you have commented out the message, so you have no idea that the commit is actually being executed. I am not surprised nothing is being deleted.