Cant' update while select is active in read-committed mode

Hi All
I try to execute my java program the following error is comming
"cant' update while select is active in read-committed mode"
I am using prepraredStatement. The query is running successfully in QueryTool or Toad. But the Error is coming while execute this line
"stmt.executeUpdate(); "
pleaes solve my problem..
Thankx

<br>Mmm, it seems same question Re: insert data problem</br>
<br>Nicolas.</br>

Similar Messages

  • Can't update while select is active in read-committed mode

    Hi
    This is my business logic:
    I m selecting the values from three tables by UNION ALL and i m geting the record set in while loop at the same time i try to insert the values which is getting from select statement in the First Table in the same while loop.
    my problem is when i try to insert into the same table the following error is occured
    "can't update while select is active in read-committed mode"
    Now what can i do ? please give me ur solution ...
    Thankx
    Merlina

    depending on how many values you have, you could store the results in memory, a vector or similar collection.
    Then close the select statement, and insert the values from your vector into the table.... should work then.
    Or, there may be a way of creating an updatable resultset ?
    This question is better directed at the
    "Java Database Connectivity (JDBC) & Transactions (JTA/JTS)" section of the forum. Maybe post a questions there, ensuring you give the URL of this question here too to avoid cross-posting.
    regards,
    Owen

  • Can't update while select is active in read-committed mode- Pls Help Me

    Hi
    This is my business logic:
    I m selecting the values from three tables by UNION ALL and i m geting the record set in while loop at the same time i try to insert the values which is getting from select statement in the First Table in the same while loop.
    my problem is when i try to insert into the same table the following error is occured
    Thanks
    Merlina

    depending on how many values you have, you could store the results in memory, a vector or similar collection.
    Then close the select statement, and insert the values from your vector into the table.... should work then.
    Or, there may be a way of creating an updatable resultset ?
    This question is better directed at the
    "Java Database Connectivity (JDBC) & Transactions (JTA/JTS)" section of the forum. Maybe post a questions there, ensuring you give the URL of this question here too to avoid cross-posting.
    regards,
    Owen

  • Update while selecting

    Is there any way in oracle where we update while selecting.
    I have a situation where I select a few rows from a table.
    Then I have to update those all those rows witrh some date as sysdate.
    I want to make sure that the rows I have selected are only updated and not a single new one.
    ex:
    select
    process something.
    update table set filed=sysdate where pk_col in (select --it is the same as 1st select );
    but in real time,
    when i select 1st time i get 40 rows.
    I process them.
    now i have to update just those 40 rows,
    but this time when I say
    update (select --its a second read.... this time select gives me 42 rows)
    maybe someone was working and he updated the table and I got 2 more rows.
    But as i processed 40, i want to update only 40 rows.
    So how can i be sure.
    Any ideas. please help.
    1 solution is to have a cursor and do the processing and updaing in the cursor.
    I process 40 rows and i update only those 40 rows in the cursor.
    other way, update when i select. i it possible.
    please let me know.
    meenakshi

    Hi.
    Check this please:
    CREATE TABLE aux_d
         id NUMBER,
         d_date DATE
    INSERT INTO aux_d VALUES(1,null);
    INSERT INTO aux_d VALUES(2,null);
    INSERT INTO aux_d VALUES(3,null);
    COMMIT;
    SELECT * FROM aux_d;
    ID     D_DATE
    1     (null)
    2     (null)
    3     (null)
    UPDATE
      SELECT *
      FROM aux_d
      WHERE id < 3
    SET d_date = SYSDATE;
    COMMIT;
    SELECT * FROM aux_d;
    ID     D_DATE
    1     14/07/11
    2     14/07/11
    3     (null)Hope this helps.
    Regards.

  • Vertical slider position not updated while displaying .pdfs with Adobe Reader X

    When a .pdf file is opened inside Firefox 4 (beta/RC1), the vertical slider position does not update while scrolling through the document until the mouse cursor is moved to the slider bar (then the slider immediately jumps to the right place).
    I am using Adobe Reader X.

    Here is a URL that will not save in Reader X:
    http://samplepdf.com/sample.pdf?meaningless=1234567890123456789012345678901234567890123456 789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456 789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456 7890/&blah=blah.pdf
    However, if the last slash is removed or encoded as %2f (which should not be necessary, as it appears in the query portion of the URL), there is no problem.

  • When shared locks are relesed in read committed.

    hi,
    https://msdn.microsoft.com/en-us/library/cc546518.aspx
    following lines are form above link
    "shared locks are acquired for read operations, but they are released as soon as they have been granted"
    Q1) Are they released after the stmt is executed " select * from a" or they are realease after the row is read and it continues with second row.
    Q2) As far as acquiring of shared lock is concerned i think they are acquired row by row , and mean  while other transaction can update rows which are not having shared lock till now , like last rows?
    yours sincerley

    That means.
    if a stmt select three rows.
    Q1)Then will it get shared lock for first row, reads it, release the lock, then take shared lock on second row and read it then release it again after reading the second row , then it will get thired row lock ....?
    Q2) As far as acquiring of shared lock is concerned i think they are acquired row by row , and mean  while
    other transaction can update rows which are not having shared lock till now , like last rows?
    Q1) Yes, in read committed mode when your query does not have any hints to change the behavior, if a query is only reading data from a table (like a SELECT statement), then the lock on each row is taken just before the row is read, the row is read, the lock
    is freed and it goes on to the next row and does the same process on that row (lock, read, free).
    Q2) Yes, the locks are acquired on a row basis.  Since they are then freed, your query will not stop other connections from updating rows in the table(s) you are reading except for the vary short period of time the lock is held on each row.  So
    your query could read lock row 1, read row 1, free the lock on row1, get a lock on row 2 and be in the process of reading row 2 when some other connection updates row 1.  That connection would be allowed to update row 1.
    Tom

  • Getting "JBO-26080: Error while selecting entity for myEO" while updating

    Hi All,
    I am using jdev 10.1.3.4. I am having updatable VO. I want to update an attribute of a particular row. I wrote the below code in my BB.
    ViewObject vo = am.getmyVO();
    Key myKey = new Key(new Object[]{6207});
    Row rw= vo.getRow(myKey);
    if (rw!= null ) {             
    rw.setAttribute("ProcessFlag",processFlag);
    am.getTransaction().commit();
    But, I am getting the below error.
    oracle.jbo.DMLException: JBO-26080: Error while selecting entity for myEO
    Can anybody help me regarding this?
    Thanx,
    Abhijit

    I do agree. Bt, what could be the root cause for this error?
    --Abhijit                                                                                                                                                                                       

  • Hello everyone, im using iphone 4, my problem is that i cant update my iphone from 5.0.1 to 5.1.1 while using software update in settings on my iphone please help......

    Hello everyone, im using iphone 4, my problem is that i cant update my iphone from 5.0.1 to 5.1.1 while using software update in settings on my iphone please help......

    Downgrading to a previous version of iOS is not supported.
    Sounds like your iPhone was hacked/modified/jailbroken to work
    with wireless carrier other than the one it was purchased from. The
    update has relocked it to the original carrier. Contact the original
    carrier to see if they offer unlocking and if you qualify - only the
    carrier to which the iPhone is locked can unlock it.
    What does it say when you look at Settings=>General=>Carrier?
    Be advised that the previous modifications to change from original carrier
    to your local Carrier may have rendered the iPhone unable to be
    officially unlocked.

  • I cant update ios software to my ipod touch..it is interrupting while downloading...how to resolve this issue?

    i cant update ios software to my ipod touch..it is interrupting while downloading...how to resolve this issue?

    Did you check your security software settings? iTunes for Windows: Troubleshooting security software issues
    iTunes has to be able to contact Apple during the  process.

  • My browser will not load a page or update unless I am actively moving my cursor or typing. If I select a page and don't do anything then it doesn't load at all. I have no idea how this happened or how to fix it. Thanks.

    My browser will not load a page or update unless I am actively moving my cursor or typing. If I select a page and don't do anything then it doesn't load at all. I have no idea how this happened or how to fix it. Thanks.

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    * https://support.mozilla.com/kb/Safe+Mode
    * https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • My ifone3gs stopped working while updating...its even nt reading sim..it just shows a connection sign toitune.. whats the prb??

    my ifone3gs stopped working while updating...its even nt reading sim..it just shows a connection sign toitune.. whats the prb??

    It means that your phone crashed during the updating process and is now in recovery mode.  See this article:
    iPhone and iPod touch: Unable to restore

  • HT4623 My iPhone 5 is in 7.0.4 and cant update to 7.1 It says "an error has occurred while checking for software update".

    Help. Cant update. Have rebooted. Switch my device off. Still this error occurred. Even tried on different wifi connections., home work, public ones.

    Update it by connecting to iTunes on the computer you sync with. The OTA update is not working for you. I had to update mine via my computer as well. I tried an OTA update twice, but both times failed. This is a fairly robust update, so even using the computer takes awhile to do.
    Cheers,
    GB

  • HT201317 My photostream in windows 7 PC does not shows any pic. when i click on slide show it start showing me slide shows of pic but when i try to copy files i cant do as no photo is viewd in list mode. This problem has arised since IOS is updated.

    My photostream in windows 7 PC does not shows any pic. when i click on slide show it start showing me slide shows of pic but when i try to copy files i cant do as no photo is viewd in list mode. This problem has arised since IOS is updated.I reinstalled my icloud and checked if icloud sharing is ON. I can see pic in my photo stream in PC only in slide show mode. While in list mode it shows pics before i actually click on photostream folder. My phone memory is out becose of bunch of photoes. How do i copy my photostream photoes.

    Hi all.  I can’t tell you how to solve your iCloud 3.x issues.  Heck, I don’t think they’re even solvable.
    But if you had a previous version of iCloud that was working correctly then I can definitely tell you how to solve the “iCloud Photo Stream is not syncing correctly to my Windows 7 PC” problem.  …without even a re-boot.
    Log out of iCloud 3.0 and uninstall it.
    Open My Computer and then open your C:\ drive.  Go to Tools/Folder Options and click on the View tab.  Select the “Show hidden…” radio button and click on OK.
    Open the Users folder.
    Open your user folder
    Open ProgramData (previously hidden folder)
    Open the Apple folder – not the Apple Computer folder.
    Open the Installer Cache folder
    In Details view sort on Name
    Open the folder for the newest entry for iCloud Control Panel 2.x – probably 2.1.2.8 dated 4/25/2013
    Right click on iCloud64.msi and select Install.
    When finished, the synching between iCloud and your PC will be back to working perfectly as before the 3.0 fiasco.  The pictures will be synched to the same Photostream folder as before the “upgrade”.  Now all you need to do is wait until Apple/Microsoft get this thing fixed and working before you try the 3.x upgrade again.
    I think the iCloud 3.0 software was written by the same folks who wrote healthcare.gov with the main difference being that healthcare.gov might eventually be made to work.
    For those of you who hate to go backwards, think of it as attacking to the rear.  Which would you rather have, the frustration of no synching or everything working on an older version?
    Good luck…

  • Error Updating Table with "Get Active UnitOfWork" Checked

    Hi everyone.
    I call invoke the a DB Adapter twice to update table in one BPEL, and so I have checked "Get Active UnitOfWork" so that each update can be persisted. I am seeing inconsistent results. What could be causing this?

    Hi, Have you checked the .jca source to make sure this value is indeed checked? Sometimes even when you check this option in the wizard it doesn't reflect in the source when you also perform a select operation: http://docs.oracle.com/cd/E12839_01/relnotes.1111/e10133/adapter.htm. Also are you using the xADataSource driver in the data source and the xADataSourceName ConnectionFactory property?
    21.1.5.1 The Value Of the Active Unit Of Work Property Is Not Saved for Outbound SELECT Operation
    While configuring an outbound Oracle Database Adapter to perform a SELECT operation, if you select Get Active Unit of Work in the Adapter Configuration Wizard - Advanced Option page, then the value of the GetActiveUnitofWork property is not saved in the .jca file.
    The workaround for this issue is to manually add this property in the .jca file of the Oracle Database Adapter, as shown in the following example:
    <property name="GetActiveUnitOfWork" value="true"/>

  • HT4623 i cant update my iphone

    i cant update my iphone from 4.1 software to any one later
    there is a message say that activation server is temporaity unavailble

    The iPhone was jail broken and modified to work with another wireless provider :)  I bought it online from a while and I never update it , now when I try to update it with I tunes it's useless , I don't know what I can do with my iPhone 3GS is it wrecked can't work, some friends told it can work with last version of iOS which it was 4.1 which was so boring , plz calm me and give an advise and sorry for bothering .

Maybe you are looking for

  • "iTunes has encountered a problem and needs to close. We are sorry for the inconvenience."

    please... help. i can't to sync my tones to my ip5s. i don't know why.... "iTunes has encountered a problem and needs to close. We are sorry for the inconvenience." "Please tell Microsoft about this problem." And bla bla bla... Already send error rep

  • Doing Math in XML Embedded Expression

    Hello all.  I'm getting stumped by what I hope is a simple problem.  I'm trying to embed a simple formula incrementing a variable to act as a "line number" for an XML document.  Writingliteral XML in visual basic.  Here's what the code looks like: <%

  • Get File Information

    Hi! I wonder if you know any way to get the extension of a file, and his creation date too. I know File class exists, but this one does not contain these methods. Do you know any way to get it both? Thank you very much, imladris

  • Why did the RSS indicator in 'top sites' stop showing?

    Since upgrading to Safari 4, top sites has been amazing.  I particularly like how each top site has it's own RSS indicator to display when new content is on that particular website.  However, in the past few weeks these have completely dissapeared. D

  • How to invoke adobe life cycle webservice using c++ (how to pass blob structure as argument)

    We already wrote sample code (.NET C#) to access livecycle webservice(this convert the input file into pdf file) using below link from adobe http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/help/wwhelp/wwhimpl/common/ht ml/wwhelp.htm?cont