BatchUpdateException :Results returned for UPDATE ONLY.

I got an error message at the statement stmt.executeBatch();
java.sql.BatchUpdateException: Results returned for UPDATE ONLY.
There are 3 SQL commands in the batch and it throws the above exception while executing the first command.
(The first command is a SELECT command with COUNT returned to a variable
eg. SELECT @ABC := COUNT(*) ....
The second and the third commands use the returned variable to make updates)
I printed out the updated information using BatchUpdateException.getUpdateCounts and I got
-3 1 1 (-3 means Statement.EXECUTE_FAILED)
However, I checked the database (mysql) and I discovered those two update commands were executed correctly ???!!!
An interesting thing is: if I use stmt.execute or stmt.executeQuery instead of executeBatch, it works fine and doesn't throw any exception.
I wonder if anybody experience similar situation before or have idea on this problem. Thanx :)

Can somebody help me, please?

Similar Messages

  • Access for update only one column in table?

    Hi all,
    My need is to grant access for update only one column c1 in table t1.
    I guess I should use view, could you please give me some example? Maybe other ideas?

    Hi,
    You can grant privileges on individual columns.
    GRANT   UPDATE (c1)
    ON      t1
    TO      grantee_name;Look up GRANT in the SQL language manual. Annoyingly, in recent editions of the manual, GRANT is not indexed, but it's in alphabetic order with all the other statements:
    http://docs.oracle.com/cd/E11882_01/server.112/e26088/statements_9013.htm#i2155015

  • 0 result returned for query "collection ('exampledata.dbxml')/article

    I  using  BDB XML I create a container called Exampledata.dbxml using java API. using a separate program I put my sigmodRecord.xml  file into the container. I then wrote another program (see the program below) to test my Query
    where Query =  "collection ('Exampledata.dbxml')/article"  but dont know why i always have
                                                      0 result returned for query "collection ('exampledata.dbxml')/article  if  the program is run. Pls can anybody help me?
    package xmldbdemo;
    import com.sleepycat.db.Environment;
    import com.sleepycat.dbxml.*;
    import dbxml.gettingStarted.myDbEnv;
    import java.io.File;
    public class simpleQuery3 {
        public static void main (String[] args) throws Throwable  {
         String theContainer = "Exampledata.dbxml";
          File path2DbEnv = new File("c:/myJavaProgs/examplesEnvironment");
         if (path2DbEnv == null || ! path2DbEnv.isDirectory()) {
               System.out.println("Bad file name");
          System.exit( -1 );
      myDbEnv env = null;
      XmlContainer openedContainer = null;
         env = new myDbEnv(path2DbEnv);
                Environment enviro = env.getEnvironment();
         // create xmlmanager
           XmlManagerConfig myManagerConf = new  XmlManagerConfig();
           myManagerConf.setAdoptEnvironment(true);
           myManagerConf.setAllowExternalAccess(true);
           XmlManager myManager = new XmlManager  (enviro, myManagerConf);
       // XmlManager myManager = new XmlManager();
        XmlContainerConfig myContainerConf = new  XmlContainerConfig();
        XmlContainer myContainer = myManager.openContainer( theContainer, myContainerConf);
        XmlQueryContext myContext =  myManager.createQueryContext();
        String myQuery = "collection('Exampledata.dbxml')/article";
        XmlResults myResults = myManager.query(myQuery, myContext, null);
        XmlValue myValue = myResults.next();
        while (myValue != null){
         XmlDocument myDocument = myValue.asDocument();
         String name  = myDocument.getName();
         System.out.println(name);

    Hi,
    The BDB forum is located here : Berkeley DB Family

  • HT4623 I want to update my iphone5 to ios7 but after selecting software update it is contineusly showing checking for update only dosent show anything.

    I want to update my iphone5 to ios7 but after selecting software update it is contineusly showing checking for update only dosent show anything.

    it likely require wifi not 3g
    it likely should only be don when connected to AC
    try using a computer and itunes to see if that let you download it that way

  • Update issues. says cannot connect to net but it is? Access itunes fine but wont connect for update, only occured when i did update to itunes on computer...help!

    Installe dnew copy of itunes, now cannot update when propmted after plugging in ipod, says not connected to internet. then trie to go itunes, which was fine. computer is connected to net ....
    Microsoft Windows XP Home Edition Service Pack 3 (Build 2600)
    System manufacturer System Product Name
    iTunes 10.3.1.55
    QuickTime 7.6.9
    FairPlay 1.11.17
    Apple Application Support 1.5.2
    iPod Updater Library 10.0d2
    CD Driver 2.2.0.1
    CD Driver DLL 2.1.1.1
    Apple Mobile Device 3.4.1.2
    Apple Mobile Device Driver 1.57.0.0
    Bonjour 2.0.5.0 (214.3)
    Gracenote SDK 1.8.2.457
    Gracenote MusicID 1.8.2.89
    Gracenote Submit 1.8.2.123
    Gracenote DSP 1.8.2.34
    iTunes Serial Number 0012AC880C0FDE28
    Current user is an administrator.
    The current local date and time is 2011-07-06 01:02:01.
    iTunes is not running in safe mode.
    WebKit accelerated compositing is enabled.
    HDCP is not supported.
    Core Media is supported.
    Video Display Information
    NVIDIA GeForce 7025 / NVIDIA nForce 630a
    **** External Plug-ins Information ****
    No external plug-ins installed.
    Genius ID: f3716be92491fd1a33f7e647a889bf41
    iPodService 10.3.1.55 is currently running.
    iTunesHelper 10.3.1.55 is currently running.
    Apple Mobile Device service 3.3.0.0 is currently running.
    **** Network Connectivity Tests ****
    Network Adapter Information
    Adapter Name: {BDA8D3FD-3CCE-4BCF-A357-0A51184CF67C}
    Description: NVIDIA nForce Networking Controller - Packet Scheduler Miniport
    IP Address: 192.168.1.3
    Subnet Mask: 255.255.255.0
    Default Gateway: 192.168.1.1
    DHCP Enabled: Yes
    DHCP Server: 192.168.1.1
    Lease Obtained: Wed Jul 06 00:38:07 2011
    Lease Expires: Thu Jul 07 00:38:07 2011
    DNS Servers: 192.168.1.1
    Active Connection: (none)
    Connected: No
    Online: No
    Using Modem: No
    Using LAN: No
    Using Proxy: No
    SSL 3.0 Support: Enabled
    TLS 1.0 Support: Enabled
    Firewall Information
    Windows Firewall is off.
    Connection attempt to Apple web site was successful.
    Connection attempt to browsing iTunes Store was successful.
    Connection attempt to purchasing from iTunes Store was successful.
    Connection attempt to iPhone activation server was successful.
    Connection attempt to firmware update server was successful.
    Connection attempt to Gracenote server was successful.
    Last successful iTunes Store access was 2011-07-06 00:56:50.
    diagnostic report. no windows firewall, norton security 2011

    If you have an iPad 1, the max iOS is 5.1.1. For newer iPads, the current iOS is 6.1.3. The Settings>General>Software Update only appears if you have iOS 5.0 or higher currently installed.
    iOS 5: Updating your device to iOS 5 or Later
    http://support.apple.com/kb/HT4972
    How to install iOS 6
    http://www.macworld.com/article/2010061/hands-on-with-ios-6-installation.html
    iOS: How to update your iPhone, iPad, or iPod touch
    http://support.apple.com/kb/HT4623
    If you are currently running an iOS lower than 5.0, connect the iPad to the computer, open iTunes. Then select the iPad under the Devices heading on the left, click on the Summary tab and then click on Check for Update.
    Tip - If connected to your computer, you may need to disable your firewall and anitvirus software temporarily.  Then download and install the iOS update. Be sure and backup your iPad before the iOS update. After you update an iPad (except iPad 1) to iOS 6.x, the next update can be installed via wifi (i.e., not connected to your computer).
    Tip 2 - If you're updating via wifi, place your iPad close to your router to preclude getting a corrupted download.
     Cheers, Tom

  • When i conect iphone 4 to itunes using cable , its check for updates only for itunes and did not check updates for iphone 4 also when i press check for updates for iphone 4

    itunes coud not check updates for iphone4 when i connect by cable only when i put iphone4 to AIR PLANE MODE

    You must Restore the phone. It will probably only worth with an AT&T SIM, unless your friend had AT&T unlock it first. The phone may be jailbroken, also; one indication of this would be the app "Cydia" on the phone's Home screen. If it is the phone is most likely worthless to you.

  • Everything I click says to upgrade to 3.6.6, but there is nowhere to download it and my "check for updates" only shows my current version, 3.6.1

    I keep having problems with "flash plug-in crashed" and "firefox has stopped working" errors. I've tried dumping the cache, restarting the browser and PC, redownloading firefox, etc. and nothing helps. My flash player and plug ins are all up to date, and apparently so is my firefox-- even though the help sections say to get 3.6.6, but there is no 3.6.6 as far as my browser and the site are concerned. Any ideas?

    You have the latest available release Firefox 3.6.10 according to your user agent:
    ''Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10 ( .NET CLR 3.5.30729)''
    See [[Finding your Firefox version]]

  • Select for update that doesn't return any rows

    Are there any odd side-effects that may occur if a select for update that returns no results is never committed? I wouldn't think there are, but I'm not sure if there would be some kind of overhead or unforeseen consequences. This isn't a terribly important question, but it's come up in some coding I've done and I've not been able to find any documentation addressing it.

    A select for update only locks rows that meet the predicate specified in the where clause. So, if the query returns no rows, no rows are locked.
    session1> SELECT * FROM t;
            ID DESCR
             1 Un
             5 One
             2 THIS IS WA
    session1> SELECT * FROM t
      2  WHERE id = 11 FOR UPDATE;
    no rows selectedA second session can update rows in the table
    session2> UPDATE t
      2  SET descr = 'One'
      3  WHERE id = 1;
    1 row updated.John
    Edited by: John Spencer on Jan 7, 2009 1:36 PM
    I just realized that, although you can do updates on the table after the select fo update that returns no rows, you cannot do DDL operations liike a truncate. Unless the session that does the select for update either ends the transaction (i.e. commit or rollback) or ends the session DDL operations will fail.

  • 10.1.3: How to disable ANOYING automatic search for updates?

    We are experiencing very anoying (meant-to-be-a-feature) performance problems when JDev is automatically looking for updates. It happens periodically (not sure... maybe every 30 min?). Is there a way to disable this?? Please please help.

    The automatic Check for Updates only occurs on startup of JDev. Apart from that, the only reason JDev would check for updates is if you manuall select Tools > Check for Updates. So, it's likely the that periodic "check" that you see is coming from somewhere else. Have you installed any extensions?
    The J-Dide.cfu.autoskip=true would be set as a command line argument when running the product, as in:
    jdevw.exe -J-Dide.cfu.autoskip=true
    -- Brian

  • JDev 10.1.2 : Check for Updates

    hi
    In "Getting Started With Unit-testing" (*1) dated December 2004, on page 7 I read this:
    "When you have an account on OTN, you can plug JUnit easily into JDeveloper from the menu: Help -> Check for Updates -> check the JUnit Extension -> next. It will automatically download the JUnit plug-in files to your [JDeveloper home]\jdev\lib\ext directory (in Oracle JDeveloper 10.1.2 and previous versions)."
    If I tried it, I got this: "No updates are available."
    Did I do something wrong or are there no updates available?
    thanks
    Jan Vervecken
    (*1) http://www.oracle.com/technology/products/jdev/collateral/papers/10g/GettingStartedWithUnitTesting.pdf
    related threads I found :
    - "JUnit plugin?"
    JUnit plugin?
    - "JDev 10.1.2 : JUnit extension"
    JDev 10.1.2 : JUnit extension

    In 10.1.2 and earlier, check for updates only tracks extensions installed by check for updates. If you install extensions manually, it doesn't know anything about them (in case you're interested, the technical reason for this is that prior to 10.1.3, we did not store sufficient version information and a unique identifier for each extension in the extension manifest, so it was impossible to identify an extension already installed in the product in lib/ext as matching an extension available on the update center.
    If you do install an already installed extension via Check for Updates, it's harmless (it will just copy the extension jar back over itself and CfU will "realize" you have it installed).
    Thanks,
    Brian

  • Apex_Item.radiogroup in a Tabular Form (Update Only, no Insert)

    Hi,
    I'd like to use a radiogroup on a tabular Form. The Form will modify only existing records.
    I've seen some more elaborate examples for Tab Forms that allow Insert.
    But I am trying to use the APEX_Item.radiogroup function for an example like:
    "Select Chairperson_Name, Approve_Status FROM Chairperson_Approval"
    The Approve_Status column can be 'A' for Accept, or 'R' for Reject, and is the only updateable column in the Tabular Form.
    So I should be able to create a Tabular Form (for Update Only) on the table Chairperson_Approval with the wizard.
    Then I want to be able to go into the Source and change the SELECT statement to something like:
    "Select Chairperson_Name, APEX_Item.radiogroup(1,approve_status,.....) FROM Chairperson_Approval"
    and then let the automatic APEX processing (generated by the wizard) do the rest. Right? Can
    anybody give me an exact example for APEX_Item.radiogroup. My documentation is not clear enough on this function.
    Thank you very much, in advance.
    Carol

    Hi Andy,
    Why do you get & set TEST attribute of the radiobutton?
    What is a TEST attribute?
    getAttribute("TEST") == 'Y')
    setAttribute("TEST","Y");So I was thinking I should incorporate this toggle me function with my radiobutton and have the following inside the toggleMe function.
    $x(''P24_SECONDARY_TASK'').value=' || ad.task_id || '"')
    {code}
    Am I right?
    Cheers
    -Joel                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • There is an invalid number of result bindings returned for the ResultSetType

    SSIS SQL Task:  Single Row Result Set
    Code was updated to test for data in target:  If Exists Do Merge  ELSE Do Insert
    Previously was just a merge that Output $Action to @ChangeSum and then @ChangeSum queried for updates and inserts
    That all worked but after injecting new code I receive the error There is an invalid number of result bindings returned for the ResultSetType that I don't know what it means or how to troubleshoot.
    Inject New Code:
    IF OBJECT_ID('tempdb..##TblTemp', 'U') IS NOT NULL
    DROP TABLE ##TblTemp
    Declare @sql nvarchar(max);
    set @sql = @TestForData
    exec (@sql);
    IF EXISTS  (select top 1 * from ##TblTemp)
           Begin
    --Beginning of existing code
               begin transaction;
                begin try
                declare @MergeQuery varchar(max)
                set @MergeQuery = convert(varchar(max), @MergeQuery1) +  convert(varchar(max), @MergeQuery2)
                + ' ' + convert(varchar(max), @MergeQuery3)
                + ' ' + convert(varchar(max), @MergeQuery4)
                + ' ' + convert(varchar(max), @MergeQuery5);
                exec(@MergeQuery);
                end try
                begin catch
                    declare
                    @Message VARCHAR(4000)
                    ,@Severity INT
                    ,@State  INT;
                    select
                    @Message = ERROR_MESSAGE()
                    ,@Severity = ERROR_SEVERITY()
                    ,@State = ERROR_STATE();
                    if @@TRANCOUNT > 0
                    rollback transaction;
                    raiserror(@Message, @Severity, @State);
                end catch;
                if @@trancount > 0
                begin
                    commit transaction;
                end
    --End of existing code
          End
    else
           Begin
        declare @InsertQuery nvarchar(max)
        set @InsertQuery = convert(varchar(max),@InsertQuery1)
        exec (@InsertQuery);
          end
    Drop Table ##TblTemp
    =================================
    SSIS Variable @InsertQuery1:
    This variable is executed in SQL Task and the last 3 lines I expect a single row of Insert & Update counts to be returned.
       declare @ChangeSum table(change varchar(25));
       declare @Inserted int = 0;
       declare @Updated int = 0;
    While 1 = 1  
        Begin  
            INSERT INTO [R_Paid].[BusCodeF454x93]
            OUTPUT Inserted.Sta3n INTO @ChangeSum
            SELECT TOP 1000 s.*
            FROM [R_Stage].[BusCodeF454x93] s
            WHERE NOT EXISTS
              SELECT 1
                FROM [R_Paid].[BusCodeF454x93]
                WHERE STA3N=S.STA3N and [BusCodeF454x93IEN] = s.[BusCodeF454x93IEN]
           IF @@ROWCOUNT  = 0 BREAK       
    END
       set @Inserted = (select count(*) from @ChangeSum );
       set @Updated = 0;
     select @Inserted as Inserted, @Updated as Updated;

    "SELECT " + (DT_WSTR,50)@[User::TargetExists] + " = CASE WHEN COUNT(*) > 0 THEN 1 ELSE 0 END
    FROM " + (DT_WSTR, 100) @[User::DataDestinationTable]
    must do the trick
    The T-SQL merge allows both inserts and updates:
    MERGE Target AS T
    USING Source AS S
    ON (T.EmployeeID = S.EmployeeID)
    WHEN NOT MATCHED BY TARGET AND S.EmployeeName LIKE 'S%'
    THEN INSERT(EmployeeID, EmployeeName) VALUES(S.EmployeeID, S.EmployeeName)
    WHEN MATCHED
    THEN UPDATE SET T.EmployeeName = S.EmployeeName
    WHEN NOT MATCHED BY SOURCE AND T.EmployeeName LIKE 'S%'
    THEN DELETE
    OUTPUT $action, inserted.*, deleted.*;
    ROLLBACK TRAN;
    GO
    Arthur My Blog

  • Customer Returns for Excisable Finished materials RG1 registers update

    Dear Experts,
    Ours is an Excisable Plant.
    The Normal Sales to Invoice process runs fine.
    When it comes to Customer Returns, kindly help me in understanding the process in receiving the Excise material.
    Right now, i'm doing the following,
    1. Create Return Sales Order w.r.t Orginal Sales Order (VA01)
    2. Create Return Del w.r.t Return SOrd. (651 Mvt Type, returns stock)
    3. Create Invoice w.r.t Delivery (VF01)
    In  the Excise Invoice area, i would like to know the following
    1) Which transaction should i execute and what are the sequence of steps in that transaction.
    Though i tried different transactions like J1IEX & J1IH, both the transactions are updating RG23A registers. Is it correct.
    2) Our Business Process Owners say that when we receive the Finished Materials back again from the customer as a return,it should update the RG1 register. Is that a valid statement. If not , is there any official document/ link we can refer to ?
    Kindly reply.
    fyi. the returns qty is a partial quantity due to some defect.
    Ex:if  the main sale qty is 100 , the return qty may be just 10. (just to confirm that we cannot go through the cancellation of main process)
    Thanks in advance.

    a)  On point no.1, you should always create a return sale order with reference to billing document only and not original sale order which is totally wrong
    b)  Right
    c)  Right.  You may also generate credit memo with reference to return order
    For updation of excise related sales returns, run T.Code J1IH and do the following:-
    Customer Credit
    Choose the Additional excise input the original excise invoice reference, document year, company code, plant and excise group and execute. There input manually what value you need to give credit and save.
    Cenvat Debit
    Choose Other Adjustment and here also, maintain the datas whatever you input as above and save.
    RG1 register will get updated only for outgoing materials and only RG23A and RG23C will get updated for incoming materials.
    thanks
    G. Lakshmipathi

  • BOP Results update only selected by check box.

    Hi Folks,
    Please help me in finding the solution.
    I have ran the Back Order Processing for a perticular material with post processing option selected using /sapapo/bop transaction.
    in the second step I want to update a few selected orders using trx /sapapo/bop_result. there it will display all the results with check box.
    my requirement is to update only selected(check box) orders.
    Points for sure.

    Hi Srinivas,
    I don't think there is way to update selected order from BOP results. I tried scenario in our system but when you hit Update button it will process all the order.
    I also refered SAP Help but it not clearly mention about that.
    In the point 5 in SAP help it says "You can update or reject the results entirely afterwards"
    http://help.sap.com/saphelp_scm50/helpdata/en/26/c2d63b18bc7e7fe10000000a114084/frameset.htm
    I hope this helps.
    Regards,
    Harshil Desai

  • When the iPhone 4 with IOS 5 is connected by cable to iTunes and check for update results in Error 1630. plz help me

    When the iPhone 4 with IOS 5 is  connected by cable to iTunes and check for update results in Error 1630, plz help me to update plz

    My Iphone 4 crashed yesterday after a restart and upload of OS 5.0, it will only partially sync.  It's not transferring any of my music or ringtones.  They still appear when I click open the sync screens on ITunes, but I don't seem to have an Ipod function and only one of my personalized ringtones transfers on the actual phone.

Maybe you are looking for

  • Compatibility issues between Berkeley DB Java Edition and Berkeley DB

    We are trying to use both Berkeley DB Java Edition and Berkeley DB (Java/C) in one of our projects. However, they share the common classes (i.e. EntryDingin.java), but with their own different impementation. Is there any reason that they have to shar

  • IPhone 5 not recognised by iTunes on my mac

    When I try to connect the phone buzzes and I am told the device is not recognised. I have tried 3 different cables and different USB ports. I have an iPhone 5 and mac. I recently synced the phone with no problems. Any help much appreciated.

  • AS2 to File Scenario - File Name management

    Dear all : I have a scenario, where a flatfile (txt) file is sent by an AS2 adapter, and is received by a file adapter. In this scenario we do not want to use a static file name, but instead we want to make it dynamic. The scenarios are explained bel

  • Process of Integration between QTP and SAP

    we are in process of integrating QTP with SAP for test scenarios how to install QTP and  SAP  and their connections . Request you all to share your experience and knowledge in this. It will be really helpful. Thanks Rajesh Burra

  • White splotches in screen

    Mac Book screen has white blotches; which started w/ just a little spot and continually spread through out the screen.   As where I live does not have an apple store, I contacted apple in 2011, and never received a response.  Now I am finding out tha