Inserting Multiple rows in Oracle DB using DB Adapter not working

Hi All,
I have a bpel process that reads actually calls the db adapter to insert(only) multiple rows in a table ..
This is a very simple process and worked fine on soa 10g
After migrating to 11.1.1.3 the invoke throws a strange error " db lock ..batch execution failed " or something.. the jca adapter rolls back causing bpel to throw a bpelx:rollback
I tried the same on 11.1.1.4 and got the same result ..
The process takes multiple orders from an entity and has xslt using for-each to write to multiple rows in the DB..
Any help is appreciated..
thanks

Thank you for your reply..
If the am1.invokeMethod("createUserLoc"); is not there in the while loop, it goes through the while loop and gives SOP values correctly.
But if I put this statement in while loop, it errors out in the first iteration itself.

Similar Messages

  • Inserting Multiple Rows into Database Table using JDBC Adapter - Efficiency

    I need to insert multiple rows into a database table using the JDBC adapter (receiver).
    I understand the traditional way of repeating the statement multiple times, each having its <access> element. However, I am just wondering whether this might be performance-inefficient, as it might insert records one by one.
    Is there a way to ensure that the records are inserted into the table as a block, rather than record-by-record?

    Hi Bhavesh/Kanwaljit,
    If we have multiple ACCESS tags then what happens is that the connection to the database is made only once. But the data is inserted row by row.
    Why i am saying this?
    If we add the following in JDBC Adapter..logSQLStatement = true. Then incase of multiple inserts we can see that there are multiple
    <i>Insert into tablename(EMP_NAME,EMP_ID) VALUES('J','1000')
    Insert into tablename(EMP_NAME,EMP_ID) VALUES('J','2000')</i>
    Doesnt this mean that rows are inserted one by one?
    Correct me if i am wrong.
    This does not mean that the transaction is not guaranted. Either all the rows will be inserted or rolled back.
    Regards,
    Sumit

  • Inserting multiples rows into a table using function or procedure..

    How do i insert multiples rows into a table using function or procedure?
    Please provide me query..

    Use FORALL bulk insert statement...
    eg:
    procedure generate_test_data as
    type cl_itab is table of integer index by pls_integer;
    v_cl_itab cl_itab;
    type cl_vtab is table of varchar2(25) index by pls_integer;
    v_cl_vtab cl_vtab;
    type cl_dtab is table of date index by pls_integer;
    v_cl_dtab cl_dtab;
    begin
    for i in 1.. 100 loop
              v_cl_itab(i):= dbms_random.value(1,1000);
              v_cl_vtab (i):=dbms_random.string('a',20);
              v_cl_dtab (i):=to_date(trunc(dbms_random.value(2453737, 2454101)),'j');          
         end loop;
         forall i in v_cl_itab.first .. v_cl_itab.last
              execute immediate 'insert into test_order values( :n, :str , :dt ) ' using v_cl_itab(i), v_cl_vtab (i), v_cl_dtab (i);          
         commit;
    end;

  • How to insert multiple rows in oracle forms when using TEMPLATE FORM

    I got a case study on PO creation nd in that I have to insert multiple rows in form especally when PO creation screen is there.
    I tried by different syntaxes but its not working.I need correct syntax to insert the multiple rows in to the table in oracle forms

    Please Oracle EBS queries on EBS forums.

  • How insert multiple rows in oracle version 8.1

    Hi All,
    I have table date_rng in which i have cloumns date_mnth and date_yr and like to insert multiple rows such (01,2011),
    (02,2011),(03,2011) etc using single insert statement.And i am using oracle 8.1 version so i do not have option of insert all into .please help me..
    Thanks
    Srini

    YOu can use this format
    insert into <table> select <column_value> from dual union all select <column_value> from dual union all ....

  • Inserting multiple rows into a table using a multiple-select list

    I'm trying to figure out how to take the output of a multiple-select list (":" separated list of values) and use that to update a table by inserting multiple rows based on the values. Is there a straight-forward way to do that in APEX?
    Thanks.
    Chris

    Hi Chris,
    I think this should give you what you need: Working with a Multiple Select List Item
    --Jennifer                                                                                                                                                                                                                                                                                                                                                                                                   

  • Inserting multiple rows into a table (using sequences)

    Hi!
    I want to insert multiple rows into a db table, but I don't know how.
    I know how to insert 1 row using a sequence:
    I put all the fields in the jsp form's page and in the submit page I put something like this:
    <jbo:Row id="myRow" datasource="ds" action="Update" rowkeyparam="MyRowKey" >
    <jbo:SetAttribute dataitem="*" />
    </jbo:Row>
    But how can I insert multiple rows like this:
    Id          Name
    1          ana
    2          monteiro
    3          maria
    Thanks!

    Hi Chris,
    I think this should give you what you need: Working with a Multiple Select List Item
    --Jennifer                                                                                                                                                                                                                                                                                                                                                                                                   

  • Inserting Multiple Images into oracle database using JDBC

    I wanted to insert multiple images into database using JDBC by reading it from the file... and i am passing photos.txt(my text file) as an input parameter... I have inserted all the values into the database except for the image part... this is my content of photos.txt file and i have copied all the images into the folder
    *" C:\\photos "*
    *1,in1.jpg,108,19,in-n-out*
    *2,in2.jpg,187,21,in-n-out*
    *3,in3.jpg,308,41,in-n-out*
    *4,in4.jpg,477,52,in-n-out*
    *5,in5.jpg,530,50,in-n-out*
    and i want to store in1.jpg,in2.jpg,in3.jpg,in4.jpg,in5.jpg into the oracle databse using JDBC.... i have tried a lot using BLOB column.... and i have created my table as
    CREATE TABLE PHOTO(
    ID NUMBER NOT NULL PRIMARY KEY ,
    Name BLOB,
    X DOUBLE PRECISION,
    Y DOUBLE PRECISION,
    Tags VARCHAR2(40)
      try {                 // for restaurant System.out.println();System.out.println();System.out.println(); System.out.print("  Creating Statement for Photo...\n");             stmt2 = con.createStatement ();                       stmt2.executeUpdate("delete from PHOTO"); stmt2.executeUpdate("commit"); PreparedStatement stmt3 = con.prepareStatement ("INSERT INTO PHOTO VALUES (?, ?, ?, ?, ?)");             System.out.print("  Create FileReader Object for file: " + inputFileName1 + "...\n");             FileReader inputFileReader2 = new FileReader(inputFileName1);             System.out.print("  Create BufferedReader Object for FileReader Object...\n");             BufferedReader inputStream2  = new BufferedReader(inputFileReader2);             String inLine2 = null;                         String[] tokens; //            String[] imageFilenames = {"c:\\photos\\in1.jpg","c:\\photos\\in2.jpg","c:\\photos\\in3.jpg","c:\\photos\\in4.jpg","c:\\photos\\in5.jpg", //  "c:\\photos\\in6.jpg","c:\\photos\\in7.jpg","c:\\photos\\in8.jpg","c:\\photos\\in9.jpg","c:\\photos\\in10.jpg","c:\\photos\\arb1.jpg","c:\\photos\\arb2.jpg", //  "c:\\photos\\arb3.jpg","c:\\photos\\arb4.jpg","c:\\photos\\arb5.jpg","c:\\photos\\den1.jpg","c:\\photos\\den2.jpg","c:\\photos\\den3.jpg", //  "c:\\photos\\den4.jpg","c:\\photos\\den5.jpg","c:\\photos\\hop1.jpg","c:\\photos\\hop2.jpg","c:\\photos\\hop3.jpg","c:\\photos\\hop4.jpg","c:\\photos\\hop5.jpg"};               File file = new File("C:\\photos\\in1.jpg");            \\ ( Just for example  )           FileInputStream fs = new FileInputStream(file);                         while ((inLine2 = inputStream2.readLine()) != null) {               tokens= inLine2.split(",");             st2 = new StringTokenizer(inLine2, DELIM);                                                             stmt3.setString(1, tokens[0]);               stmt3.setBinaryStream(2, fs, (int)(file.length()));               stmt3.setString(3, tokens[2]);               stmt3.setString(4, tokens[3]);               stmt3.setString(5, tokens[4]);               stmt3.execute(); //execute the prepared statement               stmt3.clearParameters(); 
    As i am able to enter one image file by above code in1.jpg in to the oracle database.... but i am not able to insert all the image file in to the database.....do tell me what should i do.... and can you give me the example on the basis of the above code of mine...
    do reply as soon as possible..

    jwenting wrote:
    that depends. Putting the images in BLOBs prevents the file locations stored in the database from getting out of synch with the filesystem when sysadmins decide to reorganise directory structures or "archive" "old" files that noone uses anyway.True, but it really comes down to a business decision (cost-benefit analysis). If you have the bucks, the expertise, and the time, go with the Blobs, otherwise go with the flat files.

  • Dragging multiple rows in JTable - MUST use CTRL, or not?

    Hello all!
    I'm writing an app that needs to be able to drag multiple rows from a JTable. I have seen that I can do this by selecting multiple rows with the LEFT mouse button, while holding down the CTRL key, and then dragging (again, with the left mouse button).
    The problem is, since I'm holding down the CTRL key, this comes across as a DnDConstants.ACTION_COPY.
    I find that if I do multiple selection, then drag with the RIGHT mouse button (no CTRL key held down), then I get a DnDConstants.ACTION_MOVE, as I want.
    My question: Is there any simple way to enable dragging multiple JTable rows, using the LEFT mouse button, but WITHOUT holding down the CTRL key?
    I have been tasked with "making it act like Windows", which doesn't undo a multiple-selection when one clicks on an existing selected row until one lets go of the left mouse button; whereas JTables appear to change the selection to the clicked-upon row immediately, even if it is part of the existing selection.
    Any ways around this anyone knows, short of modifying the JTable or BasicTableUI itself?
    - Tim

    By the way, I just tested this assumption of mine, and found I was wrong if you're using default JTable drag and drop.
    However, I'm using my own implementation. I notice in a simple program without any drag and drop, I get the behavior I mentioned above, so I'm guessing this IS default JTable behavior, which is then modified by the built-in drag and drop support.
    So the trick will be, how to do what built-in drag and drop is doing, without using built-in drag and drop. :-)
    - Tim

  • To insert multiple rows by getting the values from the user

    Hi
    I want to insert multiple rows into a table using user given values dynamically.
    I am a beginner to PL/SQL. Below code is part of my big code. A_row_insert is 2 and A_count is 1 (initially). While i execute , it asks for input only once and insert the same data 2 times. I want to enter two different rows. Please guide/advise me on this.
    while (A_count<=A_row_insert) loop
    dbms_output.put_line('Enter the value  for the row#'||A_count||' of the table '||v_req_tab_name||':');
    begin
    INSERT INTO customers (
    customer# ,
    lastname ,
    firstname ,
    address ,
    city ,
    state ,
    referred ,
    region
    +)+
    VALUES
    +(+
    +&customer,+
    +'&lastname' ,+
    +'&firstname' ,+
    +'&address' ,+
    +'&city' ,+
    +'&state' ,+
    +&referred ,+
    +'&region'+
    +);+
    end;
    A_count := A_count 1;+
    end loop;
    regards
    Sakthivel

    hi,
    You need to write a procedure and call it from front end for n number of time..... check the parameters you need to pass to execute the procedure.... try given sample....
    CREATE OR REPLACE PROCEDURE InsertData(i_code IN VARCHAR2,i_code_desc IN VARCHAR2,i_code_type IN VARCHAR2)
    AS
    BEGIN
         INSERT INTO CODE_MASTER (code,code_desc,code_type)
    VALUES(i_code,i_code_desc,i_code_type);
    EXCEPTION WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE ( 'Error during Insert code - '||i_code );
    END;
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    exec InsertData('code1','desc1','type1');
    Thnx MB

  • Inserting Multiple Rows into a Table

    I am having problems insert multiple rows. I am using Table1.Row1.instanceManger.addInstance(1).
    I try adding another line using
    Table1.Row2.Cell2.value.#text= "TEST"
    and I get an error acessor is unknown. I assume this is an index issue. Can someone tell me if I am doing this wrong and discuss table indexes?

    The first thing I notice is that your variable, "num," isn't initialized in the FOR loop like I'm used to seeing.. The next thing I would try would be declaring my variables outside of the loop. Something like this maybe.
    String query = null;
    Statement stmt = null;
    int rowsUpdated = 0;
    for (int num = 0; num < 10; num++);     {
         query = "INSERT into apartment (apartmentID,blockID) VALUES ('"+num+"','"+aid+"')";
         stmt = con.createStatement();
         rowsUpdated += stmt.executeUpdate(query);
    }Let me know how it goes.
    -Aaron
    http://www.WeKnowErrors.com/ A free Wiki for error codes and computer problems.

  • How to insert multiple rows in a single shot using insert command?

    Hi,
    If we insert one row, we can use "insert into" command. I want to insert multiple rows into the table in a single shot. Is there any SQL command for insert multiple rows into the table?
    Plese give the solution.
    Thanks,
    chelladurai

    If you would like to do it with SQL, this would be one of the ways to achive it:
    SQL*Plus: Release 10.2.0.4.0 - Production on Fri Sep 25 10:12:59 2009
    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    With the Partitioning, Data Mining and Real Application Testing options
    SQL>
    SQL> desc leap
    Name                                      Null?    Type
    FIRST_PRICE                                        NUMBER(16,6)
    NEXT_PRICE                                         NUMBER(16,6)
    SQL>
    SQL> select * from leap;
    no rows selected
    SQL>
    SQL>
    SQL> !vi multirow_insert.sql
    SQL> !cat multirow_insert.sql
    insert into leap(first_price, next_price) values (1,2);
    insert into leap(first_price, next_price) values (3,4);
    insert into leap(first_price, next_price) values (5,6);
    SQL>
    SQL> @multirow_insert.sql
    1 row created.
    1 row created.
    1 row created.
    SQL> commit;
    Commit complete.
    SQL>
    SQL>
    SQL> select * from leap;
    FIRST_PRICE NEXT_PRICE
              1          2
              3          4
              5          6
    SQL>

  • Inserting multiple rows using a single Insert statement without using dual

    Hi all,
    i am trying to insert multiple rows using a single insert statement like the below one.
    The below one works fine..
    But is there any other change that can be done in the below one without using dual...
    insert all
    into ps_hd_samp (num1,num2) values (1,1)
    into ps_hd_samp (num1,num2) values (2,2)
    into ps_hd_samp (num1,num2) values (3,3)
    select 1 from dual;

    NiranjanSe wrote:
    Hi all,
    i am trying to insert multiple rows using a single insert statement like the below one.
    The below one works fine..
    But is there any other change that can be done in the below one without using dual...
    insert all
    into ps_hd_samp (num1,num2) values (1,1)
    into ps_hd_samp (num1,num2) values (2,2)
    into ps_hd_samp (num1,num2) values (3,3)
    select 1 from dual;
    SQL> create table ps_hd_samp (num1 number,num2 number);
    Table created.
    SQL> insert all
      2  into ps_hd_samp (num1,num2) values (1,1)
      3  into ps_hd_samp (num1,num2) values (2,2)
      4  into ps_hd_samp (num1,num2) values (3,3)
      5  select count(*)
      6  from ps_hd_samp;
    3 rows created.
    SQL> select * from ps_hd_samp;
          NUM1       NUM2
             1          1
             2          2
             3          3

  • Want to insert multiple rows in table using EO

    Hi,
    I have one requirement where I need to insert multiple rows at once in table lets say Previous Employers.
    What I am trying to do is I have created few textinputboxes and getting there values and putting in HashMap.
    And manually inserting the rows to EO. I am not getting any error but the data is not populating in Table.
    here is the code snap ...please suggest!!
    public void updateKoelHrPreEmpVO(HashMap map)
    OADBTransaction txn = getOADBTransaction();
    //HashMap map = new HashMap();
    KoelHrPreEmpVOImpl empVO = getKoelHrPreEmpVO1();
    KoelHrPreEmpVORowImpl fetchedRow = null;
    int fetchedRowCount = empVO.getFetchedRowCount();
    RowSetIterator deleteIter = empVO.createRowSetIterator("deleteIter");
    if (fetchedRowCount > 0)
    if(txn.isLoggingEnabled(2))
    txn.writeDiagnostics(this,"Removing rows from KoelHrPreEmpVO :: Current count :: " + fetchedRowCount ,2);
    //System.out.println("Removing rows from KoelHrPreEmpVO :: Current count :: " +fetchedRowCount);
    deleteIter.setRangeStart(0);
    deleteIter.setRangeSize(fetchedRowCount-1);
    for (int i = 0; i < fetchedRowCount; i++)
    //System.out.println("Removing Row :: "+i);
    if(txn.isLoggingEnabled(2))
    txn.writeDiagnostics(this,"Removing row :: " + i ,2);
    fetchedRow = (KoelHrPreEmpVORowImpl)deleteIter.getRowAtRangeIndex(i);
    fetchedRow.remove();
    getTransaction().commit();
    deleteIter.closeRowSetIterator();
    if(empVO.getRowCount() == 0) {
    Row row = null;
    KoelHrPreEmpVORowImpl insertRow = null;
    empVO.first();
    if(txn.isLoggingEnabled(2))
    txn.writeDiagnostics(this,"Inserting rows to KoelHrPreEmpVO :: " ,2);
    try
    for(int i=1; i<=4; i++) {
    insertRow = (KoelHrPreEmpVORowImpl)empVO.createRow();
    insertRow.setEmployeeNumber(map.get("EmployeeNumber").toString());
    insertRow.setPersonId(new Number(map.get("PersonId").toString()));
    insertRow.setEmployer(map.get("Employer"+i+"").toString());
    insertRow.setStartDate(Date.toDate(map.get("StartDate"+i+"").toString()));
    insertRow.setEndDate(Date.toDate(map.get("EndDate"+i+"").toString()));
    insertRow.setEmployer(map.get("Designation"+i+"").toString());
    empVO.insertRow(insertRow);
    insertRow.setNewRowState(Row.STATUS_INITIALIZED);
    getTransaction().commit();
    catch(SQLException ex)
    ex.printStackTrace();
    Regards,
    Mukesh

    1. Pls check if the create() methos in EOImpl is in place, setting the primary key.
    2. Even though we insert values in this fashion , it only gets inserted if user performs any action, like manipulates some column. Pls check if there is any mechansm to make the row dirty ( as if done by user).
    Srikanth

  • URGENT: Insert multiple rows in a view object cache from the same Page

    Please let me know whether I can get insert multiple rows in the same view object from a single page.
    I'm using UIX on Jdeveloper 9.0.5.2
    Thanks a lot.

    Hi,
    please check Duncan Mills how-to on this
    http://www.oracle.com/technology/products/jdev/tips/mills/JSP_Multi_Row_Edits.html
    Frank

Maybe you are looking for

  • Extract the File Name with extension on double clicking it

    Hi All, I have created on program in java and also created its exe file. The application store all the files you have selected in one directory, zip the folder and give the desired extension. example myApplication.fgc Now. I need to create an applica

  • Is the iPhone 4 really worth the cash?

    When you compare to similar phones which have flash, proper bluetooth, and memory cards? What does the iPhone have that these phones don't?

  • Problems with Web Printing in BW 3.5

    Hi, to all, I am here again to see if some it can help me!!!. I have a problem with the impression in Web of the BW information, when printing the data and I´m going to advance in scroll, and you prints for example for the second page the data that a

  • Actual Activity price

    Dear All, We are into cement industry and we are following the Process Order as a cost object. Here I have an issue where in when we have process order and Activities also got confirmed now when I am seeing the cost analysis system is not showing the

  • HTML Get # tag

    Hey all I am currently using the very useful Anything Slider from CSS tricks. The only problem is that I would like to have a description underneath it that changes depending on the selected frame. As far as I can see, the way the slider itself does