execute_query after a delete error. (merged) [message #139877] |
Thu, 29 September 2005 22:52 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
renecum
Messages: 5 Registered: September 2005 Location: Guatemala
|
Junior Member |
|
|
I have a problem with deleting records from a table that is referenced by other, because the referential integrity.
When I delete a record with the smart bar, it works fine, but when use the save button, it gives me a message saying that can't delete the record.
So i tried to catch the error and change the message by my own, and it works fine.
But, i don't know how to get back the record that I deleted, I tried to use execute_query with a timer (because it is restricted) but always ask me save changes (yes/no/cancel) and I don't want to get that dialog, i just want to get back the data like nothing had happened.
Can somebody help me?
|
|
|
execute_query after a delete error. [message #139878 is a reply to message #139877] |
Thu, 29 September 2005 22:54 ![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) |
renecum
Messages: 5 Registered: September 2005 Location: Guatemala
|
Junior Member |
|
|
I have a problem with deleting records from a table that is referenced by other, because the referential integrity.
When I delete a record with the smart bar, it works fine, but when use the save button, it gives me a message saying that can't delete the record.
So i tried to catch the error and change the message by my own, and it works fine.
But, i don't know how to get back the record that I deleted, I tried to use execute_query with a timer (because it is restricted) but always ask me save changes (yes/no/cancel) and I don't want to get that dialog, i just want to get back the data like nothing had happened.
Can somebody help me?
|
|
|
|
Re: execute_query after a delete error. [message #139893 is a reply to message #139887] |
Fri, 30 September 2005 00:37 ![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) |
renecum
Messages: 5 Registered: September 2005 Location: Guatemala
|
Junior Member |
|
|
djmartin wrote on Fri, 30 September 2005 00:08 | I think you need to do a bit more reading and testing of master-detail relationships, and the use of 'deferred' and 'Masterless Operation' on the 'relation' that joins the two blocks.
|
The problem is that I'm no using master-detail blocks, (there is just one block).
I need to delete just the records that are not referenced, example:
table employee, table department
Employee references department and i want to delete department 1 that is referenced in the other table. When I use the delete button in the smart bar works fine, because i haven not committed, but when I save the message appear.
I just want a message saying that i can't delete that record because the reference, and I need that after the message appears, the record that was deleted shows again.
It is difficult to me to explain this, because my English, but i tried to do it, the best I can.
|
|
|
|
Re: execute_query after a delete error. [message #139912 is a reply to message #139893] |
Fri, 30 September 2005 01:44 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
aurigian
Messages: 9 Registered: September 2005 Location: pakistan
|
Junior Member |
![shah_zahid%40yahoo.com](/forum/theme/orafaq/images/yahoo.png)
|
|
i think u r not selecting check "enforce data integrity" during ur form creation if u check this so ur user restrict through smart bar and received message "Cannot delete master record when matching detail records exist." and u r also chnage this mesage through blocklevel trigger key-delrec and u don't need to execute_query again or n e timer
|
|
|