delete_record makes no changes [message #507077] |
Thu, 12 May 2011 07:01 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/d069370bb99042bc9ae7bf5f892d05ec?s=64&d=mm&r=g) |
Stefan21
Messages: 8 Registered: May 2011
|
Junior Member |
|
|
Hi folks
I am using 10g and want to let an user to delete a single record from a multirow form via delete button. This button is supposed to do the same, what the "delete record" button on the default menu does.
(I want a custom menu, so I can't use that button)
My delete button ist assigned to a control-block and the when-button-pressed-Trigger of that button looks like this:
-------------
DECLARE
TEMP VARCHAR(30);
BEGIN
-- Record chosen?
IF :<BLOCK>.ID IS NOT NULL THEN
SELECT <Name of record> INTO TEMP FROM <TABLE> WHERE ID = :<BLOCK>.ID;
-- Confirm!
SET_ALERT_PROPERTY('DEL_CHECK',ALERT_MESSAGE_TEXT,
'Do you really want to delete Record '|| TO_CHAR(TEMP)||' ?');
IF SHOW_ALERT('DEL_CHECK') = ALERT_BUTTON1 THEN
DELETE_RECORD;
commit;
END IF;
ELSE
Message('No ID was selected.');
go_item('<Another Button in control-block>');
END IF;
END;
---------------
The problem is, that the alert asks the user about the previously chosen record correctly, but if the user clicks BUTTON1 the Form says: No changes to save (FRM-40401).
Can anyone help me out?
|
|
|
|
|