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

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

  • 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>

  • 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.

  • I can't update my flash player and i might have a virus help me out with any advice on getting my mac on track ?

    i can't update my flash player and i might have a virus help me out with any advice on getting my mac on track ?

    You may have installed one or more of the common types of ad-injection malware. Follow the instructions on this Apple Support page to remove it. It's been reported that some variants of the "VSearch" malware block access to the page. If that happens, start in safe mode by holding down the shift key at the startup chime, then try again.
    Back up all data before making any changes.
    One of the steps in the article is to remove malicious Safari extensions. Do the equivalent in the Chrome and Firefox browsers, if you use either of those. If Safari crashes on launch, skip that step and come back to it after you've done everything else.
    If you don't find any of the files or extensions listed, or if removing them doesn't stop the ad injection, ask for further instructions.
    Make sure you don't repeat the mistake that led you to install the malware. It may have come from an Internet cesspit such as "Softonic" or "CNET Download." Never visit either of those sites again. You might also have downloaded it from an ad in a page on some other site. The ad would probably have included a large green button labeled "Download" or "Download Now" in white letters. The button is designed to confuse people who intend to download something else on the same page. If you ever download a file that isn't obviously what you expected, delete it immediately.
    Malware is also found on websites that traffic in pirated content such as video. If you, or anyone else who uses the computer, visit such sites and follow prompts to install software, you can expect more of the same, and worse, to follow. Never install any software that you downloaded from a bittorrent, or that was downloaded by someone else from an unknown source.
    In the Security & Privacy pane of System Preferences, select the General tab. The radio button marked Anywhere  should not be selected. If it is, click the lock icon to unlock the settings, then select one of the other buttons. After that, don't ignore a warning that you are about to run or install an application from an unknown developer.
    Still in System Preferences, open the App Store or Software Update pane and check the box marked
              Install system data files and security updates (OS X 10.10 or later)
    or
              Download updates automatically (OS X 10.9 or earlier)
    if it's not already checked.

  • The update 8.3 messed my iPad mini I can't get any games or sign in idk why someone pls help me!

    The update 8.3 messed my iPad mini I can't get any games or sign in idk why someone pls help me How can I fix it ?

    Zeez9t1 wrote:
    Did this already, and it didn't work
    You should have said that so that those trying to help aren't wasting their time suggesting steps that you have already taken.
    Have you tried just powering down for a while and then try again a little later? Try another WiFi network? Reset your router?

  • Iphone in recovery mode,i'm restoring and updating to itunes but download cannot be completed... my phone wont open, i can't even turn the power on.what to do? pls help

    iphone in recovery mode,i'm restoring and updating to itunes but download cannot be completed...
    my phone wont open, i can't even turn the power on.
    what to do? pls help
    (iphone 4  and  iphone 4s)

    So I just did this on my iPhone 4 and it worked like a charm it unlocked it immediately. My phone was put into recovery mode and I know that not all data is deleted it just puts the phone into a sort of hibernation in order for the files to stay uncorrupted. I went to http://www.recovery-ipad.com/iphone-stuck-in-recovery-mode.html  downloaded the software it unlocked my phone in a matter of minutes. Calls, messages, photos, apps, and voicemail was all there as if it never happened  If you leave it unregistered you don't have to pay for it works for either windows or mac. Hope this helps!

  • Have installed Illustrator CC but can't update it, won't even launch without patches... help!!!!

    Have installed Illustrator CC but can't update it, won't even launch without patches... help!!!!
    Have uninstalled it several times, and reinstalled to no avail.
    Have checked log files and changed permissions to read-write on all folders/files that the log files suggest.
    I still can't apply the update and Illustrator won't eve launch with it.
    Latest imac, mavericks
    Dave

    update manually,  http://www.adobe.com/downloads/updates/

  • I need to restore my ipad but it won't restore because the software isn't updated and you can't update the software because it is in recovery mode.  What do I do know?

    I need to restore my ipad but it won't restore because the software isn't updated and you can't update the software because it is in recovery mode.  What do I do know?

    I would take it to the apple store to get recovery mode taken off.
    Regards.

  • TS3297 after updating my iphone 3gs to ios6 a message "we're sorry, we are unable to continue with your activation at this time." pls help!

    after updating my iphone 3gs to ios6 a message "we're sorry, we are unable to continue with your activation at this time." pls help

    I have the same problem after updating to the latest iTunes. I purchased an iPhone 4S this past summer and gave my 3GS to my 6 year-old minus the SIM card-- an instant iPod Touch. Things were fine until the latest version of iTunes 11.0. Until I updated to 11.0.1, iTunes would not even "see" the iPhone.
    How do I get past the insistence to activate the phone? Right now, it's a useless brick.

  • HT5824 i lost my phone and it is switched off now...how can i find my phone with find my iphone app active thru icloud?? pls help me.

    i lost my phone and it is switched off now...how can i find my phone with find my iphone app active thru icloud?? pls help me.

    Welcome to the Apple Community.
    You can only locate your device when it is logged into iCloud and 'Find My Phone' is enabled, additionally the device will need to be switched on and connected to a wifi or cellular network.
    Unfortunately, you cannot activate iCloud or 'Find My Phone' remotely.

  • I am trying to setup iCloud account and when I login I see a popup. The Maximum number of free accounts have been activated on this iPhone. Pls, help me fix it. What other accounts? Thanks

    I am trying to setup iCloud account and when I login I see a popup. The Maximum number of free accounts have been activated on this iPhone. Pls, help me fix it. What other accounts? Thanks

    Then you'll have to use another iOS device or Mac running OS X Lion or higher to create a new account for you to use on your phone.  If you don't have one, perhaps a friend would allow you to create and account on their device (note: this will use one of their three maximum accounts).  To do this, they would need to go to Settings>iCloud, tap Delete Account (which will delete the account from their device but not from iCloud), then allow you to sign back in with your ID to create the new account.  Then tap Delete Account to delete the new account from their device, and finally, sign back in with their iCloud ID to restore their iCloud account to their device.  Then you can sign in with your ID on your phone in Settings>iCloud and use the new account.

  • Hi Everyone.  I have an old Mac Book.  I have saved a ton of emails in my inbox 'On My Mac'.  There are so many it is slowing down my computer.  Where do I find the folder with all the emails so I can cut and paste them to an external hard drive?Pls.help.

    Hi Everyone.  I have an old Mac Book with software updated to 10.6.8.  I have saved a ton of emails in my inbox 'On My Mac'.  There are so many it is slowing down my computer.  Where do I find the folder with all the emails so I can cut and paste them to an external hard drive? Pls.help.  Tks.

    Depending on which email client software you use
    the files should be in 'your home folder' library, esp.
    if you use Mail application.... ~/Library/Mail
    Since you don't specify what mail application,
    that would most be associated with the file.
    I notice there are some items to the right of your post
    where it says "more like this' so that may be worth a
    look to see if similar issues were answered. Also, the
    Help viewer in your system is a searchable database.
    Seems that google also brings up fair information, too.
    Do you have a complete bootable clone of your entire
    Mac system on an externally enclosed hard disk drive?
    Good luck & happy computing!

  • HT204053 sir; i can't import song and videos from pc to my iphone pls help me

    sir; i can't import song and videos from pc to my iphone pls help me

    We are fellow users here on these forums, you're not talking to iTunes Support nor Apple - if you would like help then you will need to provide more information than 'can't import' e.g. how are trying to sync content and what happens when you do it ?
    You have the latest version of iTunes installed on your computer, and your phone appears in it when it's connected to your computer ? If not then see if this troubleshooting page helps : http://support.apple.com/kb/TS1538
    You should be able to sync music and films/TV programmes by selecting your phone on the left-hand sidebar of your computer's iTunes (you can enable the sidebar via control-S on a PC) and then using the tabs on the right-hand side of the iTunes screen to select and sync your content
    Is that how you are trying to do it and it's not working ?
    If you haven't synced your phone to that computer before then you may also find this page useful : https://discussions.apple.com/docs/DOC-3141

  • You can only specify the READPAST lock in the READ COMMITTED or REPEATABLE READ isolation levels

    Hi, I have a piece of code that works fine in SSMS as T-SQL. When I put the T-Sql inside a SP, I get the error :
    You can only specify the READPAST lock in the READ COMMITTED or REPEATABLE READ isolation levels
    The script starts is as follows (only select)
    SET NOCOUNT ON
    Set Transaction Isolation Level Read Committed
    Set Deadlock_Priority Low
    Select......
    From MyTable WITH (NOLOCK)
    GROUP BY .....
    Order BY ....
    works fine as I said in SSMS as T-SQL but the SP generates the following
    Msg 650, Level 16, State 1, Procedure usp_TotalMessages, Line 15
    You can only specify the READPAST lock in the READ COMMITTED or REPEATABLE READ isolation levels.
    By the way, when it says line 15, from where we should start counting, is it from The USE DB statement which includes comments as well as Set ANSI....or should we start counting from the Alter PRocedure statement
    Thanks in advance

    Set Transaction Isolation Level Read Committed
    Set Deadlock_Priority Low
    Select......
    From MyTable WITH (NOLOCK)
    GROUP BY .....
    Order BY ....
    First you define transactionlevel = "Read Committed", then you use a query hint "NOLOCK" which is equivalent to "Read Uncommitted"; so what do you want now, committed or uncommitted, you have to decide.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

Maybe you are looking for

  • Special character [ ] on the mainframe

    I'm trying java on the mainframe (03/390 with Unix System Services Enabled, Java 1.3.1). This is all new to me so bare with me. When I compile the HelloWorld.java code: class HelloWorld {                                          public static void ma

  • EJB Transaction does not work

    Hi, I have a servlet, a session bean, and an entity bean. A servlet doesn't have any transaction attribute, a session bean has Required, and an entity bean has Required. I have the code like the following: Servlet: EJBDelegate ed = new EJBDelegate();

  • ICal Syncing Issues: iCloud & iMac to iPhone Not Working

    I use iCal. I updated my iCal on my iMac and it updated to iCloud, but not my iPhone. When I open iCal on my iPhone, it cycles and cycles to update, but doesn't update. What can I do to get my iPhone iCal to sync?

  • WMS Interface EDI?

    Hello All, I have the following requirement, and I would like your help: I need to connect a R/3 - WMS system with a R/3 system. For this we will use a EDI software to share IDOCS(files) in a directory, both system will send and receive IDOCS. The ED

  • RPC Client Access Logs - Throttling Policy

    Trying to get useful information on who is being throttled by a specific policy. Created the policy: New-ThrottlingPolicy -Name LimitMessagesSent -RecipientRateLimit 5 -ThrottlingPolicyScope Organization Enabled RPC Client access logging: <add key="L