Multi Row Delete and then I get a unique contraint violation on my PK

I have a simple table with 2 columns, one a PK. I have a checkbox style, multi-row delete function setup on this (to be honest, APEX set this up automatically).
I removed the add/edit functionality to keep just the delete button and delete procedure.
When I select an item, and then click delete, I get a unique constraint violation that I'm violating my Primary Key.
How can I fix this, or see what it's doing when it tries to delete the row?

Hi,
It sounds as though you haven't properly removed all of the add/edit functionality or that you still have some form of validation and/or computation in place or that you have a trigger that is trying to insert records into, for example, a history table (is the constraint on the table you are deleting from - the error message should tell you this?)
Check that the only process you have is ApplyMRD and that this is pointing to the correct table and has the correct primary key set. Ensure that this has Conditional Processing set for a Request of "MULTI_ROW_DELETE".
Check for any validations - there is no need to perform validations if your user can not insert or update data unless you want to check that they've ticked one or more checkboxes.
Check for processes that could run if the user clicks the Delete button. Validations and processes could be conditional on either the button click or on request = "MULTI_ROW_DELETE".
Review any triggers that you have on the table to ensure that deletions do not try to insert records into another table where the primary key on that table is not being populated.
Regards
Andy

Similar Messages

  • Multi-row Delete (MRD) on a view?

    All,
    I created a tabular form on a view, using an instead of trigger to encapsulate the logic for the data manipulations. Works great--until someone checks a row and hits the delete button, at which point APEX throws this error:
    ORA-20001: Error in multi row delete operation: row= 107970-18527, ORA-06502: PL/SQL: numeric or value error: character to number conversion error,
    Error     multi row operation failedAs far as I can tell, it's not even getting to the trigger; I commented out the body of the instead of delete trigger (replacing it with null), and I'm still getting the same error. I have no validations or processes on the page at this point.
    The underlying data of the view requires three columns for a unique identifier, so I've concatenated two of them together as an extra column in the view (creating a varchar2 column), and told the MRD to use the calculated column and the third column as the primary key columns. But even using two of the three numeric columns (tweaking the trigger to use a hard-coded value for the third) as an ID fails miserably.
    Any idea what's going on?
    Thanks,
    -David
    (In case it makes a difference, we're on APEX 4.0.1.)

    Hi David,
    This might help:
    http://oraclequirks.blogspot.com/2011/07/ora-20001-error-in-multi-row-delete.html
    Hope it helps!
    Regards,
    Kiran

  • Validation in a Multi Row Delete

    Hi all,
    i made a page with an updateable report region - all works fine.
    But now i want to do a validation in the process 'Multi Row Delete'.
    The aim is to guarantee that the specific row is not deleted if the validation for that row fails.
    How can i achieve that?
    Any feedback is welcome.
    Best regards
    Martin

    Hi,
    many thanks for your reply.
    Yes in my case it is a tabular form and the validation should be done vor 'multi row delete'. Accordingly to the article you mentioned i created a validation with the following PL/SQL code:
    DECLARE
    vRow PLS_INTEGER;
    BEGIN
    FOR i in 1..apex_application.g_f01.COUNT LOOP
    IF apex_application.g_f01(i) IS NOT NULL THEN
    vRow := TO_NUMBER(apex_application.g_f01(i));
    IF lpkom_api.checkPersonAssigned(apex_application.g_f03(vRow)) THEN
    RETURN 'Delete is not allowed for this row.';
    END IF;
    END IF;
    END LOOP;
    END;
    Best regards
    Martin

  • Multi Row Delete Error

    Hi,
    Am trying to do a multi row delete on a report. Have added a [row selector] to the report and a 'multi row delete' process. Copied this from a sample app i got, but when i try and delete a row(s) i get the following error message:
    Unexpected error, unable to find item name at application or page level.
    ERR-1002 Unable to find item ID for item "P2_ROWS" in application "120".
    Can anyone give me any hints as to why this might be happeneing?
    Best regards
    Simon

    Simon,
    Are you still having trouble with this?
    Scott

  • Problem with multi row delete

    Hi, I'm new in apex and I tried to build master detail report on some view. Everything is cool but "delete checked" doesn't work.
    "ORA-20001: Error in multi row delete operation: row= , ORA-06502: PL/SQL: numeric or value error: NULL index table key value,"
    the problem is that I don't know what is wrong :), I have a special trigger "instead of delete on MY_VIEW", but in this error problem is not explained.
    Anybody knows what can be wrong? It is probably a problem with trigger or multi row doesn't work with views? I couldn't find how MRD knows what kind of statement use to delete rows so I don't know if the statement that program used is correct. In debug it lokks that:
    0.32: ...Do not run process "ApplyMRU", process point=AFTER_SUBMIT, condition type=REQUEST_IN_CONDITION, when button pressed=
    0.32: ...Process "ApplyMRD": MULTI_ROW_DELETE (AFTER_SUBMIT) #OWNER#:MY_VIEW:ITEM1:ITEM2
    0.33: Show ERROR page...
    0.33: Performing rollback...
    thanks for any help
    //sorry for english mistakes
    edit: it doesn't matter if I use in trigger delete from ... where item1=:OLD.item1 ; or if I use item1=:P4_item1 (which actually saves correct values)
    Edited by: user5931224 on 2009-06-13 08:55

    I realised that this is not a problem with trigger, I changed trigger to "NULL;" and problem is the same. Maybe sb used master detail on view not only on tables and know what can be wrong in this situation?

  • Tabular form - Multi row delete error

    Apex 4.0.2
    We have a simple CRUD type of application on a bunch of tables built using Apex v1.6 that has, over the years, been upgraded to v4.0.2 and it is working mostly fine. It uses all out-of-the-box standard components, forms, classic reports, nothing too fancy. Recently one of the tabular forms started to misbehave, the multi-row-delete process raises a No Data Found error. The tabular form is based on a view with a INSTEAD OF trigger to handle the DML. Manually deleting the row in SQL*Plus works fine delete from mytab here pk_id = :pk_id but selecting the same row in Apex and clicking Delete raises the error.
    How does one go about troubleshooting & fixing this sort of thing? I tried re-saving the region in the Builder, exporting/importing the entire app, nothing. Running in Debug mode doesn't really provide any additional information, just that the MRD process failed. Tabular forms are the most frustrating, opaque component in Apex, wish they were easier to troubleshoot.
    Any ideas?

    Hello Vikas,
    >> How does one go about troubleshooting & fixing this sort of thing?
    By given us a bit more information :)
    • Is it a manual Tabular Form (using the ITEM API) or a wizard created one?
    • Are the Insert/Update operations work correctly? If not, what is the type of your PK column(s)?
    • If the problem is limited to the Delete operation, maybe the problem lies with the checkbox column. Are you sure that on page it is rendered as the f01 column?
    • As triggers are involved, can you save the PK that the trigger sees? Is it the expected value?
    • Are there any other processes that are fired before the DML process? If so, maybe the problem is with them. You can temporarily disable them and see if it change anything.
    >> Tabular forms are the most frustrating, opaque component in Apex, wish they were easier to troubleshoot
    Yes, I agree. However, I believe that 4.1 made some serious advancement where Tabular Form is concerned. Having simplified Tabular Form related Validations and Process should make things easier, and as a result, prone to less errors. Still, the main problem is that the type of error you are talking about is usually the result of metadata problems and these are indeed very hard to track.
    Regards,
    Arie.
    ♦ Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    ♦ Author of Oracle Application Express 3.2 – The Essentials and More

  • ORA-20001: Error in multi row delete operation: ORA-01403: no data

    Whenever I attempt a multi-row delete on my master detail page, I recieve the error:
    ORA-20001: Error in multi row delete operation: ORA-01403: no dataI have seen in other threads that the primary key attribute of the underlying table needs to be set to 'Show' in the report attributes. I have tried this both with it displaying as 'Hidden' ('Show' is unchecked) and with it displaying as text. Either way still gives me the same error.
    Is there anything else not mentioned in the other threads that could be causing this error for me?
    Thanks.
    BoilerUP

    Jimmy,
    In your multi row delete process you specify schema name, table and column name. Your report needs to be of type “SQL query (Updateable report)”. And your report needs to include the primary key column of your table. The column or alias name of that report column needs to correspond with the actual column name of your table.
    Marc

  • Getting the "Internet Search" box when opening an email in AOL. The AOL email blinks and then I get the "Internet Search".

    Problem with reading AOL emails. When I try to read an AOL email (old or new) the AOL email appears for a split second and then I get an "Internet Search" box and cannot see the email.
    I had read that some have seen a similar problem getting a Bing Search box and they were able to delete that add on to correct it, but I have no add ons at all.

    You may have zoomed the page(s) by accident.
    Reset the page zoom on pages that cause problems.
    *<b>View > Zoom > Reset</b> (Ctrl/Command+0 (zero))
    *http://kb.mozillazine.org/Zoom_text_of_web_pages
    Clear the cache and remove cookies only from websites that cause problems.
    "Clear the Cache":
    *Firefox/Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Firefox/Tools > Options > Privacy > "Use custom settings for history" > Cookies: "Show Cookies"

  • HT4859 And what if my brother backs up in icloude but all his clander has been deleted and wants to get the event in the calender back , what should he do ?

    And what if my brother backs up in icloude but all his clander has been deleted and wants to get the event in the calender back , what should he do ?

    Assuming he has a backup that includes the data that has been deleted, then we should use that backup to restore his device.

  • And what if my brother backs up in icloude but all his clander has been deleted and wants to get the event in the calender back , what should he do ?

    And what if my brother backs up in icloude but all his clander has been deleted and wants to get the event in the calender back , what should he do ?

    Assuming he has a backup that includes the data that has been deleted, then we should use that backup to restore his device.

  • Multi-Row Delete from a table via a button without submitting the page

    Hi,
    I have a simple page based on a (temporary) table. There is a submit button that calls a PL/SQL process. However, I would like to have an 'Abort' button that deletes all rows from the table belonging to a specific user.
    I had a look at 'Processes -> Data Manipulation --> Multi Row Delete' but this can only be linked to a page level event such as onSubmit. My onSubmit is linked to another process so this is not an option for me.
    I thought of creating a PL/SQL function for the deletion and calling it from Javascript linked to a button. I have done the PL/SQL and the button but don't know how to call PL/SQL from JS. And is this the correct way of doing something like a deletion? Any documents that show how can this be done will be much appreciated....
    I had a look at the forum and the documentation but could not find anything for multil-row deletion triggered from a button.
    Your help is appreciated as I'm a newbie :-)
    Thanks
    Angela

    Hi,
    I actually found the solution. I created a button (that submits) and a computation that calls the PL/SQL function conditional on that button being pressed. Initially I got confused because I already had another PL/SQL function attached to different button. I didn't think that having two buttons that submit the page and call different functions was possible.
    Thanks
    Angela

  • When I delete emails , they just get deleted and do not get moved to trash

    When I delete an email , it just gets deleted and does not get moved to trash. Its pretty frustrating as I regularly hit the delete by mistake and I lose the email because it just does not get moved to trash .I have checked the preference to find some setting that might cause this ( like delete trash immediately) in mail preferences to no avail. I also have ran file system check and cleaned and repaired the Mac-HD in hope of solving the problem to no avail. This has been happening only for a few days. The funny thing is , I also noticed that a folder I was trying to copy from My main HD to a secondary one ( not in mail but just on the computer), suddenly disappeared and I could not locate it . Am I going crazy? Someone please help.

    Hi hadjibaba. You’re welcome.
    Report the names of the files and folders present at the first level of the ~/Library/Mail/POP-username@mailserver/ account folder in the Finder.
    In order to post the exact file names and avoid typing mistakes, proceed as follows. In the Finder, go to ~/Library/Mail/POP-username@mailserver/. With that folder open, if you’re looking at it in View > as List mode, first collapse any expanded folders so that the Finder only shows the files and folders at the first level. Now, do Edit > Select All (⌘A), then Edit > Copy (⌘C), and paste it in your reply to this post.
    BTW, if you’re running Mac OS X 10.3 (Panther), as your profile indicates, it would have been more appropriate to discuss this in the Mail & Address Book - Mac OS X 10.3 & earlier forum. If the discussion applies to both Mail 1.x and Mail 2.x, it doesn’t really matter, but it’s difficult to know that in advance.
    Note: For those not familiarized with the ~/ notation, it refers to the user’s home folder. That is, ~/Library is the Library folder within the user’s home folder, i.e. /Users/username/Library.

  • I am trying to buy songs on itunes and half way through the terms and conditions come up, I accept them and press return and then I get a 'session timed out' notice and the sale hasn't gone through - tried loads of times / updating software, any answers?

    I am trying to buy songs on itunes and half way through the terms and conditions come up, I accept them and press return and then I get a 'session timed out' notice and the sale hasn't gone through - tried loads of times / updating software, any answers?

    I am trying to buy songs on itunes and half way through the terms and conditions come up, I accept them and press return and then I get a 'session timed out' notice and the sale hasn't gone through - tried loads of times / updating software, any answers?

  • Every now and then I get about a half second clip of another song

    Every now and then I get about a half second clip of another song at the end of a song. If you immediately go back and play the same again, you get the same little burp at the end. But if you play three or four songs and then go back, the little burp is not there. I did a restore on the ipod, and I am still getting the little burps. It only happens maybe once out of every 10 songs played.
    Files are MP3's which play fine on the PC in WMP and itunes, and on Dell DJ15, Zune and Sansa MP3 players. Some of the MP3s were ripped from CD using MusicMatch, some recorded off old lps using Creative Go!, and some downloaded so I don't think it is an issue with the MP3s themselves. Since I use several different players, I don't want to maintain a separate AAC library just for the ipod.
    Usually the burst is so short that you can't even tell who the artist was, but when I have recognized it was always something very close alphabetically - at the end of a Cream song I got a little Creed, at the end of a Bad Company song I got a little Bachman-Turner Overdrive, at the end of a Led Zeppelin track I got a little Linkin Park.

    Does this help?
    http://docs.info.apple.com/article.html?artnum=61638
    Using Windows, the only answer would seem to be to re-encode them using iTunes.

  • HT2513 How do you change the name of a reminder in the reminder list.  I right click and then choose "get information"  I can change the colour of the reminder but when I type in the name that I want and then press enter the name stays as "untitled".

    How do you change the name of a reminder in the reminder list.  I right click and then choose "get information"  I can change the colour of the reminder but when I type in the name that I want and then press enter the name stays as "untitled"

    Jerry,
    Thanks for replying again. I've got a little bit further thanks to you. I tried the US keyboard layout as you seemed pretty definte that it should work. This time I applied the setting and also started the language toolbar and selected it from there.
    Hey presto, I've got the @ where it should be. Excellent.
    However the single quote ' works in a weird way. When I press it, it doesn't show up on the screen. But when I press another key, I get the single quote plus the next key I press. When I press the single quote twice, I get 2 of them. This is also the same with the SHIFT ' key. i.e. for the double quotes.
    Very strange. I'll look at other keyboards and see where that gets me.
    Thanks,  Maz

Maybe you are looking for

  • Use of 2 graphic cards vs. one

    I managed to get with my son at the office today and performed some limited testing to check out the new Premiere CC 2014 using a Sapphire Radeon HD 7950, Single and dual Nvidia K5000s in a MP5,1 and Dual D700s in a MP6,1. The results were interestin

  • Runtime Error when opening videos.

    I just got Premiere Elements and have played with a few videos. When I try to open some of my videos I get a runtime error and it shuts down. Can someone help me?

  • What driver to use?

    What driver to use?Hey All, I have been using the default Creative drivers since I got my X-FI Titanium a couple months ago. Overall I have had a good experience with them but I am finally tired of the random cracking/distortion that I get every once

  • File doesn't sound the same when I return to it

    I worked hard on a mix of a tune back in December. I have a bounce from that session that I listen to as a reference, but when I open the Logic File, some regions don't play, automation is off and all sorts of things are not the same. It's like the w

  • Widget browser / Spry 2.0 - install without internet connection

    Hello, everyone. Is there a way to install the widget browser and Spry Toolbar 2.0 into DW CS5 without an internet connection?  The dev network is isolated from the internet per company policy. Respectfully, ^_^