RowInconsistentException update row programmatically

JDev 11.1.2.2.0

I have a selection multiple richeTableau linked to VO.  The user can select several lines and click the button 'Update of the lines'.  Bean managed then iterates through the selected lines and updates some fields of each line with calculated data.

For some reason, I get RowInconsistentException Houston-25014 when you try to update this VO after entering data in the database of another display table.  But if I go to another page and then return to the page with the selection multiple richeTableau, I can update the lines with no problems at all.


Example of process:

  1. Insert data into the table from database from another page.
  2. After inserting the data, go to the page with the selection multiple richeTableau and try to update the data, but get the error RowInconsistentException.
  3. Go to another page.
  4. Return to the page with the selection multiple richeTableau and select the same or the rows to be updated.
  5. The data are updated WITHOUT getting the error RowInconsistentException.

The only difference between this particular VO/EO and other VO/EOs I could update programmatically, this EO uses a sequence for setting the PK expression.

I have Google was on my end and read through the many discussions here about the RowInconsistentException error, but none of the potential solutions have worked in my situation.  I tried to check "Refresh on Insert" / "Refresh on update" in OS for all fields that I am trying to update.

Code that is an iteration and try to update the data:
[code]

{} public void signOffDialogListener (DialogEvent dialogEvent)

Result = dialogEvent.getOutcome ();

BindingContainer links = ADFUtils.getBindingContainer ();

DCIteratorBinding iter = bindings.get("MyVO1Iterator") (DCIteratorBinding);

MyVOImpl vo = iter.getViewObject ((MyVOImpl));

if(Outcome == Outcome.OK) {}

for (Key key: selectedRowKeys) {}

MyVORowImpl line = vo.getRow (key) (MyVORowImpl);

row.setUserId (GuidoUtils.getCurrentUserId ());

Date dt = dtCompletionDate.getValue () (Date);

Timestamp ts = new Timestamp (dt.getTime ());

row.setTrainerReviewCompDt (ts);

row.setIsProficient ((String) selProficient.getValue ());

vo.getDBTransaction () .commit ();

}

vo.executeQuery ();

AdfFacesContext.getCurrentInstance () .addPartialTarget (mainDisplayTable);

}

popupSelectMultiConfirm.hide ();

return;

}

[/ code]

Any help is appreciated.

Clear the cache on the validation of the transaction that adds data. Add the suggestion earlier in the method that adds data.

DBTransaction dBTransaction = vo.getDBTransaction ();

dBTransaction.setClearCacheOnCommit (true);

dBTransaction.commit ();

Tags: Java

Similar Questions

  • TortoiseSVN and LabVIEW to export the updated files programmatically the revision to another.

    Can I use LabVIEW to check the files to update the in a repository or a folder from one version to the other and export a list of paths to these files programmatically? That's when comparing one version of the repository to another.

    Thank you for your help

    http://StackOverflow.com/questions/9190931/get-changed-files-from-SVN-command-line-between-two-Revis...

    Looks like "diff" is the right command to use.

    Edit: With the option - summarize flag so it does not seek to return the real differences in the files.

  • Update firmware (programmatically)

    Hello

    I don't know if there is a way to update the Firmware of the OTA Blackberry device.

    A small utility that can check if any (OS) updates for the phone exist? If it does only download OTA.

    I checked JDE Documentation but could find no information for the same.

    Kind regards

    Cedric

    a third-party application is not able to open it

  • Update line programmatically with Composite primary keys

    Hi all

    I use JDeveloper 11.1.2.4.0,I want to update the program with two primary keys PK1_ID and PK2_ID line

    When I have a primary key I can do it by:

    /////////////////////////////////////////////////////

    Key = new key (new Object() {empid});

    Employees1ViewImpl vo = (Employees1ViewImpl) this.getEmployees1View1 ();

    Locate the line using key reference in the View object.

    Line k = vo.getRow (key);

    using this method, we can set the new FirstName

    k.setAttribute ("FirstName", "Vero");

    this.getDBTransaction () .commit ();

    ///////////////////////////////

    Is it possible to use the same code with more of primary key?




    Kind regards

    The key class contains an array of attributes that identify the line you're looking for. In your case, the key has two attributes

    Key = new key (new Object() {pkId1, pkId2});

    the rest of the method works as what.

    Timo

  • Presentation tabular - when the updated row, add a user id and a time stamp line.

    Hello.
    I have a simple tabular presentation based on a table of four elements: the primary key (seq #), title, Updated_by, Updated_timestamp.
    I want to fill the Updated_timestamp and updated_by fields when a user updates or adds to the table.
    On other forms, I use a calculation to update the page_item in section page_processing of the APEX. However, in the form of tables, I don't know
    where I can update these two fields.
    Any suggestions?

    Thank you! I think the trigger is the way to handle this. Thanks again.

  • Error in the updated row using multiple PO API update

    Hi all

    I want to update several lines of the PO for this I'm using the PO_CHANGE_API1_S.UPDATE_PO API.
    But some how, whenever I update IN. several lines am getting following error

    The document is locked by another user. Please try again later.

    I tried with DBMS_LOCK. Sleep (1), but sometimes work and sometimes it isn't.
    Could someone tell me how can I avoid this, is there another way to do this. Help, please

    Thanks in advance

    Ravi Raj.

    I'm not sure of the code you are using, but you can consult the following documentation for the code examples on the use of this API.

    How Po_change_api1_s.Update_po of the API works in 11.5.10? [335083.1 ID]
    How to use PO_CHANGE_API1_S.update_po to change three lines [1077455.1 ID]
    View demo - how to use the change IN API for updating of existing purchase orders [ID 1078842.1]

    Thank you
    Hussein

  • Poor performance during the iteration/update rows of a tree table

    Hello

    We have a tree table based on a VO and EO (with transitional attributes). One of the attributes is an indicator.
    The original Version is filled with a complex query with several thousand lines.

    Now, when the user clicks on a node, all children are updated (their flag is set to true) recursively.

    It's really really slow. It may take several minutes, while a similar update via PL/SQL on a real table would take a few seconds.

    Is it possible to improve the performance? We have already applied all the tunings on EO as VO mentioned in the Oracle Documentation, but they had almost no effect:
    -keep the viewlink iterators set line
    -indicators of query
    -Use the batch update

    The algorithm we use is the following:
        private void checkTreeNodes(JUCtrlHierNodeBinding node, Boolean check) {
            if (node == null) {
                return;
            }
    
           TreeVORowImpl nodeRow = (TreeVORowImpl)node.getRow();
            if (nodeRow != null) {
                    nodeRow.setFlag(check);
            }
    
            List<JUCtrlHierNodeBinding> children = null;
            if (!nodeRow.getLevel().equals("4"))  // no more than 4 levels
                children = node.getChildren();
    
            if (children != null) {
                for (JUCtrlHierNodeBinding _node : children) {
                    checkTreeNodes(_node, check);
                }
            }
        }

    Hello

    try to move the logic of the definition of the transitional indicator at the service of the company (method exposed on the client interface) and then refresh the tree instead of a record thousand on the client component analysis.

    Frank

  • How to send email from the updated row

    I have an interactive forum. Whenever I update of an item and click on apply, then I should be able to send e-mail to this 'particular update line.

    I would advise against a trigger. Triggers can roll back, but you can't roll back by e-mail. If you want to be careful about sending emails about things that do not exist, or has not updated. Better to have it as a process that comes after the update. In this way no be sent unless the update succeeds.

  • Inserting multiple rows programmatically received the unique key error

    I'm developing an application using ADF BC (JDev 11.1.1.5) ADF.

    I have a table with the attributes (id, tpId, trId) where tpId is in reference to the primary key of the table tp and trId is in reference to the primary key of the table tr. The combination of tpId and trId should be unique to table A.

    I wrote the following codes in my bean to create multiple records (from selections on a page of the user interface that allows users to select tables tp and tr).

    CCPC DCBindingContainer = getDCBindingContainer();
    DCIteratorBinding iter = dcbc.findIteratorBinding("AVO1Iterator");
    RowSetIterator rsi = iter.getRowSetIterator ();
    for (int x = 0; x < selectedRowCount; x ++) {}
    Line myRow = rsi.createRow ();
    myRow.setAttribute ("Tpid", tpRowId [x]);
    myRow.setAttribute ("Trid", trId);
    myRow.setNewRowState (Row.STATUS_NEW);
    rsi.closeRowSetIterator ();
    try {}
    System.out.println ("insert:" + myRow.getAttribute ("Tpid") + "," + myRow.getAttribute ("Trid"));
    dcbc.getDataControl () .commitTransaction ();
    created ++;
    } catch (Exception e) {}
    System.out.println ("insert:" + myRow.getAttribute ("Tpid") + "," + myRow.getAttribute ("Trid"));
    System.out.println (e.getMessage ());
    DUPS ++;
    }
    }

    Unfortunately, I get the following error:

    Insertion: 535, 48
    Failed: 535, 48
    Houston-26048: constraint 'A_UK1' is violated during the operation "Insert" post with SQL statement ' BEGIN INSERT INTO A(ID,TPID,TRID) VALUES (: 1,: 2:3) in RETURNING ID, TRID INTO: 15,: 16; END; ».
    Insertion: 537, 48
    Failed: 537, 48
    and so on...

    I check the database, there is no record at all thanks to the combination.

    Did anyone here see the rub on my codes?

    The framework works as expected. If you try to insert a key duplicated at once, you must clear the error before you can continue. In your case, you can use a rollback on the transaction to clear the error.
    Another thing that seems strange to me is that you do not set the id of the new line, which is without doubt the pharmacokinetics of the of the line.

    Timo

  • Update rows in a remote table by synonym

    Hi all

    I'm new to Apex and I have searched this forum about this, but could not find.

    Here's what I'm trying to do.

    I have DB1, where the Apex is installed. And I want to access/update of the data in the db2 tables. Here are the steps I followed

    1 created a dblink in DB1 to DB2.
    2. created synonym in DB! remote table TableA to DB2. create synonym tablea_syn for tablea@dblink1;
    3. now through the Apex object browser, I would be able to update/insert/delete records in tableA@dblink. Then, I selected synonyms in the object browser, but not able to see all the lines that are present in tableA@dblink1. I'm Basel to see lines using Toad.
    Is it possible to put day/remove or insert new lines into remote tables using synonyms thru Apex?

    Please help me with this problem.

    Thanks in advance.

    Salvation (what is your name?)

    I took a peek in your application and I have corrected and tested an update. You have a few syntax errors, and I don't blame you because I already had them when I posted the code. I wanted to write a quick pseudo-code and you have to change accordingly. In any case, it's working now, and here are a few syntax errors, I found:
    1. When you want to refer to an element of the apex in a SQL, it must begin by ":", for example: P1_EMP_NAME
    2 - the keword 'from' was missing in the inert training
    3 make sure create you processes in the logical right place, your submit the process that happens after the location header! which means that it will take place the first thing in your page, and it's wong. usually this type of process must be placed in the last section of process (on submit after validation... etc)

    Hope you feel better now,

    Thank you
    Sam

  • * URGENT * how to turn the table rows programmatically?

    Hi Experts ADF,

    I am a developer of the ADF, but not an expert. Here is my requirement, please help me to achieve the same. It is very urgent and would be a great help.

    In our ADF Faces application, we have a SEARCH page where we assume to design a table with 3 rows and 2 columns. While the search page is loading only the first line must be activated and the other below 2 rows should be disabled (can be visible, but gradout). In the first column of each row is a box of choice (which will be rated Firstname, lastname, Department,... UserID) and the next column is a free text box (input field).

    Ex: In the first row when we select Firstname and enter the value in the free text box, then the second row should be activated when we tab out of the text box line. If the top textbox is empty then the second row should not be enabled. When I get the value in the text field of the line of the 2nd and the 3rd row must be enabled. Max 3 lines. All 3 rows may be visible on the page, but the last 2 rows should be gradout.

    How to do the same, please help me with a little explanation. Do I have to use the ADF PPR to do the same, if so, how do the same? Thanks in advance.

    Thank you
    klogube

    Sorry, it took a little time :-(

    I implemented a small example, if you get the picture...

    Page code:

    
               
                  
                    
                  
                  
                    
                  
                  
                    
                  
                
    

    Bean code:

    public class IPTBean
    {
        String mS1;
        String mS2;
    
        public IPTBean()
        {
            super();
        }
    
        public void setS1(String aS1)
        {
            this.mS1 = aS1;
        }
    
        public String getS1()
        {
            return mS1;
        }
    
        public void setS2(String aS2)
        {
            this.mS2 = aS2;
        }
    
        public String getS2()
        {
            return mS2;
        }
    }
    

    I put the bean in the flowrate range of page (but you can use any variable you like i.e. links)

    When you run the page, you see a tabled text input and a button. Type something in the files and hit return or the tab out of the field and you see the next filed.

    Now you can use this technique to hide and show your user interface.

    Timo

  • How to define adf transient tables attribute val for all rows programmatically

    Hello
    I did drag the data control of database on the page and added a transient attribute Boolean visibleFlage (true / false). There is the button on which I want to put all the lines visibleFlage to true or false by programming. How iterate through the iterator in the table and set the attribute for all lines as a fake or a real one.

    Published by: 925410 on July 2, 2012 02:33

    Check this: http://docs.oracle.com/cd/E14571_01/web.1111/b31974/bcservices.htm#sm0203

  • ViewObject do not retrieve all rows programmatically

    Hi all
    I use Jdeveloper version 11.1.2.1.0
    I consulted a VO inside a bean managed by the following code
         
    private void getEmployeeRowCount(){  
     BindingContext bctx = BindingContext.getCurrent();
     DataControl myAMDataControl = bctx.findDataControl("MyAMDataControl");
     ApplicationModule service = (ApplicationModule)myAMDataControl.getDataProvider();
     ApplicationModule myAM = service.findApplicationModule("MyAM");
     ViewObject employeeVO = myAM.findViewObject("EmployeeVO");
     System.out.println(employeeVO.getRowCount());
     }
    At first it prints the actual number of lines in the t
    But if I call this function after the I accessed EmployeeVO during execution (specifically when I change any value in EmployeeVO), the employeeVO.getRowCount () function returns the value 1

    what I am doing wrong?

    Thank you
    Puneet

    After you clear the view criteria to get the actual number of lines.
    Try

    vo.applyviewCriteria(null);
    vo.executeQuery();
    sop(" " +vo.getRowCount());
    
  • Automatic update problems on the computer.

    Why should I now have the automatic updates on get updated? I don't live in America Rual downtown, which means that whenever I want to use my computer I can't because you are using the updated row. Not a very polite requirement Microsoft!

    Activation or automatic updates of Windows disable
    http://www.computerhope.com/issues/ch000538.htm

    On a more technical level: how to turn off the Windows Update feature in Windows XP
    http://support.Microsoft.com/kb/892894

    J W Stuart: http://www.pagestart.com

  • Silent update and delete applications

    Hi all

    I was wondering if it is possible for a BlackBerry app to be able to update or delete itself, without, if possible, give error/caution messages. It is possible to do in J2Me using special extensions of specific suppliers, but not in generic j2me. In this case, the j2me application makes a call to some native API, asking to update/delete itself and then out of himself to the native operating system to take the necessary steps. Such a solution, or something similar, is available for the BlackBerry applications? In versions of the OS?

    Thank you

    Basilio J V Souza

    An application cannot update itself, but you can programmatically change an another third-party application.

    Install and update applications programmatically

    http://supportforums.BlackBerry.com/T5/Java-development/programmatically-install-and-upgrade-Applica...

Maybe you are looking for

  • How to convert an image to grayscale 8 bits unsigned 2D table

    Hello. The "Color Utilities' Vision Development Modulde function contains the ColorImageToArray IMAQ, who only has the 32-bit unsigned integer as output values. Y at - it an option to reach a value of the integer not signed 8 bit at the exit?

  • In the file open/create/replace bug

    I found this problem in LabVIEW 2009. The Boolean indicator doesn't seem to work properly in the first snippet. It returns TRUE even with a valid path. With some trial and error, I found a work around that will work correctly at the moment. I just wi

  • Drivers for pavilion g6-2355so with Win7

    Hello! I recently picked up a HP pavilion g6-2355so because the long story short, the previous owner had messed up their original OS and now had nothing about it - then just left on a shelf to gather dust. I have now installed Windows 7 above and I a

  • Was BLOCKED with my company email! NOT happy :(

    I was stuck on my email as it had been hacked. This is the account of MY COMPANY and I got an email back stating that they could not open back up that my responses do not match but they do and I have emails from customers, I responded with more infor

  • My Dungeon freecell offering the same number consistantly

    When I start a game, the same cards appear