|
|
|
|
|
|
|
|
|
Re: unable to delete the record [message #541886 is a reply to message #541884] |
Fri, 03 February 2012 00:42 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
COMMIT you have in WHEN-BUTTON-PRESSED trigger on the "Delete" button is trying to save datablock values into a table. LAST_NAME item is empty, but the column is NOT NULL so it fails.
So, are there any values in a data block? Make sure there aren't.
Anyway: I think that what you are doing is wrong. As it is a datablock, there's no reason to delete records as you are trying to. If you want to remove certain employee's record, you should:
- enter query mode
- put 115 into the EMP_ID item
- execute query
- once the values are retrieved, DELETE_RECORD (a built-in). Not DELETE FROM ... (a statement).
If you insist on deleting any record by entering EMP_ID and using DELETE statement, write a new form. Put EMP_ID into a control block (i.e. the one that is not based on a table). Create "Delete" button and put DELETE FROM ... statement into WHEN-BUTTON-PRESSED trigger.
That would work, but the question is WHY would you want to do it that way, which is far more complicated that default Forms processing?
|
|
|
|
|
|