Try to update a table using resultset and nothing happens

I am trying to update a table in my database.
I already know the row I want to update by the reporttrikid in the where clause.
Nothing happens when I run this code. It does not fail but my table never gets updated.
I have done inserts and selects with no problem, but I must be doing something wrong when it comes to an update.
Can someone please help?
try
conn = XCConfig.getInstance().getConnection();
logger.debug("connection: " + conn);
sql = "UPDATE " + REPORTTABLE + " SET " + REPORTTRKMISC + "=?" +
" WHERE " + REPORTTRKID + "=?" ;
logger.debug(sql);
stmt = conn.prepareStatement(sql);
logger.debug("sql TRKID: " + "");
Iterator it = List.iterator();
while (it.hasNext()){
     XCDocPriceFilter filter = (XCDocPriceFilter) it.next();
//filterTrkId = filter.getTRKId();
     //trkid = Integer.parseInt(filterTrkId);
trkid = filter.getTRKId();
logger.debug("Update trkid: " + trkid);
stmt.setString(1,trkMisc);
stmt.setInt(2,trkid);
rs = stmt.executeQuery();
}//end iterator
rc = true;
}

I am still not getting anything updated.
I am using the following code.
int updateCount = stmt.executeUpdate();
logger.debug(updateCount + " records were updated!");
The logger says it has been updated, when I go to the
table the table has not changed.Is your connection in auto-commit mode? Maybe it hasn't committed it (yet). Did you also remember to close your JDBC resources (rs, stmt, conn)?

Similar Messages

  • Running Mavericks, when I try to print on my  HP LaserJet 1320tn I get the message  "Printing - The printer is in use." and nothing happens. Worked fine with Mountain Lion.

    I'm running Mavericks and when I try to print on my networked HP LaserJet 1320tn I get the message  "Printing - The printer is in use." and nothing happens. The same set up works fine's with Mountain Lion. I am uptodate. Any thoughts?

    Hi,
    Thanks, but these suggestions aren't helping.
    I have
    1. tried to print form a different add
    2. deleted and reinstaled the printer
    3. deleted and reinstall the printer drivers
    4. reset the printing system
    there's no problem with the printer or the wireless as (1) i can print using my partner's mac with mountian lion and (2) I can see the printer on my own mac (mavericks)
    Any more suggestions?
    Thanks
    Laurie

  • While using my Iphone 5, all of a sudden  black and white stripes where on the screen. I have tryed to turn the phone off and on again, but there are only the stripes. I can't use it, and nothing happens when I push the buttons. Can someone help me?

    While using my Iphone 5, all of a sudden  black and white stripes where on the screen. I have tryed to turn the phone off and on again, but there are only the stripes. I can't use it, and nothing happens when I push the buttons. Can someone help me?

    Try resetting your phone, hold the home and sleep/wake button down until the apple symbol comes up, then release. If that doesnt work, you may have damaged your phone and need to take it to an apple genius bar.

  • On a windows 7 PC, I tried to update to itunes 10.7 and nothing happens. itunes locks up. Just before this, I downloaded ios6 for my iphone 4 and it failed with an error message to that effect. The iphone is also locked up.

    itunes freezes up with no error message. Previous to this, I downloaded ios6 for iphone and that failed as well. The iphone is frozen too. Any ideas?

    Dear Jody..jone5
    Good for you that can't update your iphone because I did it and my iphone dosen't work for example I can't download any app like Wecaht or Twitter..
    Goodluck
    Atousa

  • I try to print to printer from computer and nothing happens. it is a wireless printer

    how do i print from wireless printer and computer?

    Hello btlcrzy48.
    It would help knowing which printer model you have and which Operating System you are using with your printer.
    Cheers!
    Wixma.
    I am an HP employee.
    Say thanks by clicking the Kudos star in the post.
    If my reply resolved your problem, please mark it as as Accepted Solution so that it can be found easier by other people.

  • I try to share a movie to vimeo and nothing happens... i click publish and nothing...

    what could cause Imovie to do nothing when i clcik on publish to share a movie to vimeo?

    Nadine,
    See the More Like This links on the right. You will find that others have had luck with fixing this by trashing the Pages Preference files.
    Jerry

  • Just updated from elements 11 to 13. When I try to use Levels in Elements 13. I click on the slider with my bamboo pen and nothing happens for a few seconds, sometimes not at all. This worked fine in Elements 11.

    Just updated from elements 11 to 13. When I try to use Levels in Elements 13. I click on the slider with my bamboo pen and nothing happens for a few seconds, sometimes not at all. This worked fine in Elements 11.

    Never mind my question on the photoshop elements 13 trying to install the camera raw update. It has been taken care of thank goodness!

  • How to Update  crmd_customer_h TABLE Using CRMV_EVENT Through Funtion Module

    Hi
    How we can update customer_h table using the CRMV_EVENT Where i implemented logic below in the Funtion Module.
    data:     lt_doc_flow          TYPE crmt_doc_flow_wrkt,
              lw_cust_h_com        TYPE crmt_customer_h_com,
              lw_input_field_names TYPE crmt_input_field_names,
              lt_input_field_names TYPE crmt_input_field_names_tab,
              lt_objects_to_save TYPE crmt_object_guid_tab,
              lw_guid TYPE CRMT_OBJECT_GUID.
    DATA : lv_process_type TYPE crmt_process_type.
    data: wa_doc_flow type CRMT_DOC_FLOW_WRK.
    data: wa_customer_h type crmd_customer_h.
    *  Function module for retriving the Process type.
      CALL FUNCTION 'CRM_ORDERADM_H_READ_OW'
        EXPORTING
          iv_orderadm_h_guid     = iv_header_guid
        IMPORTING
          ev_process_type        = lv_process_type
        EXCEPTIONS
          admin_header_not_found = 1
          OTHERS                 = 2.
    if lv_process_type eq 'ZG01'.
    CALL FUNCTION 'CRM_DOC_FLOW_READ_OB'
    EXPORTING
       IV_HEADER_GUID                 = iv_header_guid
    IMPORTING
       ET_DOC_FLOW_WRK                = lt_doc_flow.
    read table lt_doc_flow with key objtype_a = 'BUS2000116' INTO wa_doc_flow. "gc_object_type-service.
                if sy-subrc eq 0.                    "set flag for service order
                lw_cust_h_com-ref_guid       =  wa_doc_flow-objkey_a.
                lw_cust_h_com-ZZTRAIL_FLAG   = 'X'.
                 lw_cust_h_com-mode           = 'A'.
                lw_cust_h_com-ref_handle     = '0000000001'.
                lw_guid = wa_doc_flow-objkey_a.
                INSERT lw_guid INTO TABLE lt_objects_to_save.
         endif.
                  lw_input_field_names-fieldname = 'REF_GUID'.
                lw_input_field_names-fieldname = 'ZZTRAIL_FLAG'.
              lw_input_field_names-changeable = ' '.
               INSERT lw_input_field_names INTO TABLE lt_input_field_names.
    Maintain Customer H
             CALL FUNCTION 'CRM_CUSTOMER_H_MAINTAIN_OW'
                  EXPORTING
                    is_customer_h_com    = lw_cust_h_com
                  CHANGING
                    ct_input_field_names = lt_input_field_names
                  EXCEPTIONS
                    header_change_error  = 1
                    header_create_error  = 2
                   error_occurred       = 3.
    ENDIF.
    *endif.
    *Clearing local variables
      clear: lv_process_type,
             lw_cust_h_com,
             lw_input_field_names.
    *Free internal tables
      free: lt_doc_flow,
            lt_input_field_names.

    Hi Faisal
    I think your not clear with what i am saying anyhow i will again explain you my requirement
    As per my requirement
    1)in the service order search report i need to add a field called "Has trail order with No Follow up" with values "Yes" & "Blank"
    For above Field i added  using the structure CRMST_QUERY_SRVO_BTIL and through configuration i am able to display the field in webui as per (Attachement Pic 1)
    2)When i  search with search criteria as  "Has trail order with No Follow up" with  "Yes"
    Then in result list i need to show the service order those having follow up as trail orders(sales order) only.if for  next document trail order  having any follow up then those service orders dont want to show in result list.
    For above requirement i implemented F.M using CRMV_EVENT & I configured for BUS2000115 And BEFORE_SAVE The Order
    The FM Will get trigger when i save the service order and for that service order if create any follow up and try to save the trail order then This FM Will trigger and in this i am doing validations.
    3)Add one AET Trail Flag field is added under CUSTOMER_H Table.
    4)in the FM I am validating for if the trail order having the preceding document as service order then i need to make flag as "X" For that service order in customer_h
    if suppose when i delete trail order from the service order then that flag must need to be "unset" from the CUSTOMER_H.
    Why bcoz we are doing above process is do show records in result list based on Flag values
    these flag checks are validating in the BADI Which we implemented for search logic.
    Please refer below Login for my requirement:-
    Proposal to have a custom “flag” field (background at table level,
         crmd_customer_h) linked to service order which gets flagged whenever at
         least one Trial order is created and saved from the Service Order.
    The flag value should be cleared when all the trial orders created and
    saved as follow up transactions are deleted from the system.
    Similarly for Trial Orders will use the same custom “flag” field
         which gets activated when at least one follow up is created and saved from Trial Order.
    The flag value should be cleared when all the follow up transactions from
    the Trial Order are deleted from the system.
    When the above search criteria “Has Trial order with no follow up”
         “is” “Yes” is applied then the logic derives all the service
         orders which satisfy additional search criteria applied in the search and
         for these Service orders checks if the custom flag field is checked to
         derive all Service orders which have Trial order. The custom flag values
         values are derived from crmd_customer_h table in CRM.
    4 )Further for all the Trial Orders determined in Step 3
    check if the Trial Order has a follow up by checking if the custom flag field
    is checked. The custom flag values are derived from crmd_customer_h table in
    CRM.
    5) If step 4 is not met populate the preceding Service
    Orders in the Result list

  • Updating multiple tables using JDBC Adapter

    Hi,
    I am trying to insert/update multiple tables using one message via JDBC adapter. The following is the message being posted. However, only the first statement was executed. Anything wrong?
    Thanks in advance!
    Hart
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:DeliveryDBUpdate xmlns:ns0="http://test.com/r3_integration"><DeliveryData><DelHeader action="UPDATE_INSERT"><table>DelHeader</table><access><DelNo>0080000230</DelNo><DelType>LF</DelType><XOverwrite>X</XOverwrite><ShipTo>0000000026</ShipTo><SoldTo>0000000026</SoldTo><Priority>00</Priority><DocDate>02/17/2007</DocDate><GText>CIF Test</GText><DelDate>02/20/2007</DelDate><PickDate>02/20/2007</PickDate><ShipPoint>NO02</ShipPoint><PackCount>00000</PackCount></access><key><DelNo>0080000230</DelNo></key></DelHeader>
    <DelItem action="INSERT"><table>DelItem</table><access><DelNo>0080000230</DelNo><ItemNo>000010</ItemNo><GText>10# GRAN-GREAT VALUE</GText><Material>G04410G611</Material><Plant>6005</Plant><SLoc>6005</SLoc><RefDoc>mmenon32</RefDoc><RefItem>00000000</RefItem><DelQty>5.000</DelQty><UOM>BL</UOM></access><access><DelNo>0080000230</DelNo><ItemNo>000020</ItemNo><GText>25# GRAN- GREAT VALUE</GText><Material>G04025G611</Material><Plant>6005</Plant><SLoc>6005</SLoc><RefDoc>mmenon32</RefDoc><RefItem>00000000</RefItem><DelQty>5.000</DelQty><UOM>BG</UOM></access></DelItem></DeliveryData></ns0:DeliveryDBUpdate>

    Hi,
    You need 2 STATEMENT level tags,
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:DeliveryDBUpdate xmlns:ns0="http://test.com/r3_integration">
    <b><DeliveryData1></b>
    <DelHeader action="UPDATE_INSERT">
    <table>DelHeader</table>
    <access>
    <DelNo>0080000230</DelNo>
    <DelType>LF</DelType>
    <XOverwrite>X</XOverwrite>
    <ShipTo>0000000026</ShipTo>
    <SoldTo>0000000026</SoldTo>
    <Priority>00</Priority>
    <DocDate>02/17/2007</DocDate>
    <GText>CIF est</GText>
    <DelDate>02/20/2007</DelDate>
    <PickDate>02/20/2007</PickDate>
    <ShipPoint>NO02</ShipPoint>
    <PackCount>00000</PackCount>
    </access>
    <key>
    <DelNo>0080000230</DelNo>
    </key>
    </DelHeader>
    <b><DeliveryData1></b>
    <b><DeliveryData2></b>
    <DelItem action="INSERT">
    <table>DelItem</table>
    <access>
    <DelNo>0080000230</DelNo>
    <ItemNo>000010</ItemNo>
    <GText>10# GRAN-GREAT VALUE</GText>
    <Material>G04410G611</Material>
    <Plant>6005</Plant>
    <SLoc>6005</SLoc>
    <RefDoc>mmenon32</RefDoc>
    <RefItem>00000000</RefItem>
    <DelQty>5.000</DelQty>
    <UOM>BL</UOM>
    </access>
    <access>
    <DelNo>0080000230</DelNo>
    <ItemNo>000020</ItemNo>
    <GText>25# GRAN- GREAT VALUE</GText>
    <Material>G04025G611</Material>
    <Plant>6005</Plant>
    <SLoc>6005</SLoc>
    <RefDoc>mmenon32</RefDoc>
    <RefItem>00000000</RefItem>
    <DelQty>5.000</DelQty>
    <UOM>BG</UOM>
    </access>
    </DelItem>
    <b></DeliveryData2></b>
    </ns0:DeliveryDBUpdate>
    Try with such a strcuture and let us know if it works.
    Regards
    Bhavesh

  • Code to update a table using sqlldr

    Hi all,
    can anybody give the code to update a table using sqlldr with an example
    thank you

    You want add the new line and modified the existing line (based on empno) from file e:\scripts\sql\emp2_ext.dat into table emp2 :
    7782,CLARK,MANAGER,7839,09/06/81,80000,,10
    8000,ORACLE,DATABASE,,11/02/07,99999,,20Then :
    SQL> conn system/mypwd
    Connected.
    SQL>
    SQL> create directory my_dir as 'e:\scripts\sql';
    Directory created.
    SQL>
    SQL> grant read,write on directory my_dir to scott;
    Grant succeeded.
    SQL>
    SQL> conn scott/mypwd
    Connected.
    SQL> create table emp2_ext
      2  (EMPNO    NUMBER(4),
      3   ENAME    VARCHAR2(10),
      4   JOB      VARCHAR2(9),
      5   MGR      NUMBER(4),
      6   HIREDATE DATE,
      7   SAL      NUMBER(7,2),
      8   COMM     NUMBER(7,2),
      9   DEPTNO   NUMBER(2)
    10  )     
    11  ORGANIZATION EXTERNAL
    12  ( TYPE ORACLE_LOADER
    13    DEFAULT DIRECTORY my_dir
    14    ACCESS PARAMETERS
    15    ( records delimited by newline
    16      badfile my_dir:'emp2_ext.bad'
    17      logfile my_dir:'emp2_ext.log'
    18      fields terminated by ','
    19      missing field values are null
    20      ( empno, ename, job, mgr, hiredate char date_format date mask "dd/mm/yy",
    21        sal, comm, deptno
    22      )
    23    ) LOCATION ('emp2_ext.dat')
    24  ) ;
    Table created.
    SQL>
    SQL> select * from emp2_ext;
         EMPNO ENAME      JOB              MGR HIREDATE        SAL       COMM     DEPTNO
          7782 CLARK      MANAGER         7839 09/06/81      80000                    10
          8000 ORACLE     DATABASE             11/02/07      99999                    20
    SQL> select * from emp2;
         EMPNO ENAME      JOB              MGR HIREDATE        SAL       COMM     DEPTNO
          7782 CLARK      MANAGER         7839 09/06/81      24500                    10
          7839 KING       PRESIDENT            17/11/81      50000                    10
          7934 MILLER     CLERK           7782 23/01/82      13000                    10
    SQL> merge into emp2 a
      2  using (select * from emp2_ext) b
      3  on    (a.empno=b.empno)
      4  when matched then update set a.ename=b.ename,
      5                               a.job=b.job,
      6                               a.mgr=b.mgr,
      7                               a.hiredate=b.hiredate,
      8                               a.sal=b.sal,
      9                               a.comm=b.comm,
    10                               a.deptno=b.deptno
    11  when not matched then insert (a.empno, a.ename, a.job, a.mgr, a.hiredate, a.sal, a.comm, a.deptno)
    12                        values (b.empno, b.ename, b.job, b.mgr, b.hiredate, b.sal, b.comm, b.deptno);
    2 rows merged.
    SQL>
    SQL> select * from emp2;
         EMPNO ENAME      JOB              MGR HIREDATE        SAL       COMM     DEPTNO
          7782 CLARK      MANAGER         7839 09/06/81      80000                    10 --modified line
          7839 KING       PRESIDENT            17/11/81      50000                    10
          7934 MILLER     CLERK           7782 23/01/82      13000                    10
          8000 ORACLE     DATABASE             11/02/07      99999                    20 --added line
    SQL> HTH,
    Nicolas.
    Well, Hans has already give good explanation with docs links...
    Message was edited by:
    N. Gasparotto

  • HT4623 When i try to update my ipod using iTunes, it say it can't be done b/c it cant contact my ipod software server!!!

    When i try to update my ipod using iTunes, it say it can't be done b/c it cant contact my ipod software server!!!

    Update Server
    Try:
    - Powering off and then back on your router.
    - iTunes for Windows: iTunes cannot contact the iPhone, iPad, or iPod software update server
    - Change the DNS to either Google's or Open DNS servers
    Public DNS — Google Developers
    OpenDNS IP Addresses
    - Try on another computer/network
    - Wait if it is an Apple problem

  • How to pick max value from a column of a table using cursor and iteration

    Hello Everybody
    I have a table loan_detail
    and a column in it loan_amount
    now i want to pick values from this table using cursor and then by using iteration i want to pick max value from it using that cursor
    here is my table
    LOAN_AMOUNT
    100
    200
    300
    400
    500
    5600
    700i was able to do it using simple loop concepts but when i was trying to do this by using cursor i was not able to do it .
    Regards
    Peeyush

    SQL> SELECT MAX(sal) Highest_Sal,MIN(sal) Lowest_Sal FROM emp;
    HIGHEST_SAL LOWEST_SAL
           5000        800
    SQL> set serverout on
    SQL> DECLARE
      2    TYPE tmp_tbl IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
      3    sal_tbl tmp_tbl;
      4    CURSOR emp_sal IS
      5      SELECT sal FROM emp;
      6    counter INTEGER := 1;
      7  BEGIN
      8    FOR i IN emp_sal LOOP
      9      sal_tbl(i.sal) := counter;
    10      counter := counter + 1;
    11    END LOOP;
    12    DBMS_OUTPUT.put_line('Lowest SAL:' || sal_tbl.FIRST);
    13    DBMS_OUTPUT.put_line('Highest SAL:' || sal_tbl.LAST);
    14  END;
    15  /
    Lowest SAL:800
    Highest SAL:5000
    PL/SQL procedure successfully completed.
    SQL> Even smaller
    SQL> DECLARE
      2    TYPE tmp_tbl IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
      3    sal_tbl tmp_tbl;
      4    CURSOR emp_sal IS
      5      SELECT sal FROM emp;
      6    counter INTEGER := 1;
      7  BEGIN
      8    FOR i IN emp_sal LOOP
      9      sal_tbl(i.sal) := 1;
    10    END LOOP;
    11    DBMS_OUTPUT.put_line('Lowest SAL:' || sal_tbl.FIRST);
    12    DBMS_OUTPUT.put_line('Highest SAL:' || sal_tbl.LAST);
    13  END;
    14  /
    Lowest SAL:800
    Highest SAL:5000
    PL/SQL procedure successfully completed.
    SQL> Edited by: Saubhik on Jan 5, 2011 4:41 PM

  • Updated to Yosemite, no problem.  now iPhoto and iMovie won't open.  Says I need to update software however, when i try to update indicates my User ID and PW won't work for these two pieces of software.  User ID and PW works everywhere else.

    Updated to Yosemite, no problem.  now iPhoto and iMovie won't open.  Says I need to update software however, when i try to update indicates my User ID and PW won't work for these two pieces of software.  User ID and PW works everywhere else.

    I am having the same problem.  I even changed my password and updated all of my security information.  Now it just gives me an error and retry message, which of course also does not work.  Went to support and was going to open a chat (seemed the simpler option) and received a message that my support has expired for this serial number unless I want to pay $29.00.  So I chose the option to call later, which was the exact time suck I was trying to avoid.  Why wouldn't the new operating system also update the apps that were already part of my old platform?

  • I'm trying to update my apps using the creative cloud desktop app. I can't see any apps in the app tab, the wheel just spins round and round and nothing happens. Has anyone got any ideas? I've tried uninstalling the desktop app and reinstalling but it sti

    Hi
    I'm trying to update my apps using the creative cloud desktop app. I can't see any apps in the app tab, the wheel just spins round and round and nothing happens. Has anyone got any ideas? I've tried uninstalling the desktop app and reinstalling but it still has the same problem.
    Cheers
    Rachel

    Hi Rachel,
    You can follow the article: App doesn't open | Progress wheel spins continually to get your issue fixed.
    Let us know if the issue still persists or not.
    Regards,
    Ratandeep Arora

  • Help! My iPod 5th gen all the sudden will not turn on. I was using it earlier today, it has a full battery and worked fine earlier. Nothing happens when I try to restart/turn off, it just remains black. I plugged it into my pc and nothing happened.

    Help! iPod Touch 5th gen.
    It worked fine earlier today, I was using it with no issues. I just picked it up to use it again and it's dead...nothing happens when I try to restart/shut off. I plugged it into my PC and nothing happens, my pc doesn't acknowledge it. Please help, I have 1500 pic of my daughter on here and they aren't backed up ..

    If your iPod Touch, iPhone, or iPad is Broken
    Apple does not fix iDevices. Instead, they exchange yours for a refurbished or new replacement depending upon the age of your device and refurbished inventories. On rare occasions when there are no longer refurbished units for your older model, they may replace it with the next newer model.
    ATTN: Beginning July 2013 Apple Stores are now equipped to do screen repairs/replacements in-house on iPhone 5 and 5C. In some cases while you wait. According to Apple this is the beginning of equipping Apple Stores with the resources needed to do most repairs for iPhones, iPads, and iPod Touches that would not require major replacements. Later in the year the services may be extended as Apple Stores become equipped and staffed with the proper repair expertise. So, if you need a screen repaired or a broken screen replaced or have your stuck Home button fixed, call your local Apple Store to see if they are now doing these in-house.
    You may take your device to an Apple retailer for help or you may call Customer Service and arrange to send your device to Apple:
    Apple Store Customer Service at 1-800-676-2775 or visit online Help for more information.
    To contact product and tech support: Contacting Apple for support and service - this includes international calling numbers.
    You will find respective repair costs in the appropriate link:
    iPod Service Support and Costs
    iPhone Service Support and Costs
    iPad Service Support and Costs
    There are third-party firms that do repairs on iDevices, and there are places where you can order parts to DIY if you feel up to the task:
    1. iResq or Google for others.
    2. Buy and replace screen yourself: iFixit

Maybe you are looking for

  • Feature request  for JDev in comparision with Eclipse

    In JDeveloper 10.1.3 Preview release, I see only one option to find out a resource (applies only to Java files). Eclipse supports this feature for any type of resource in Workspaces. (Ctrl+Shift+R) : You can find any resource in Eclipse but In JDev t

  • Getting ORA-00904 whle running a procedure!

    hi , the following procedure is meant for getting the details which has name of the user tables alone along with number of columns,but am getting -ERROR IN BLOCK:::ORA-00904: "tablename": invalid identifier. DECLARE v_cols NUMBER:=0; cursor c is SELE

  • My MacBook no longer connects to the Internet even though my wifi bar is connected and full

    I don't know what I am doing wrong My iPad can connect no problem but my MacBook doesn't In settings the wifi is green and connected The Ethernet is red Fire wire is red And Bluetooth is red I tried changing from dhcp to dhcp with manual but nothing

  • List Component multipleSelection and wmode

    I'm trying to use the list component with multipleSelection set to true; however when I set wmode to transparent in FireFox the multiple selection breaks. It appears to function properly in IE. Does anyone know of a workaround for this? Thanks in adv

  • Deadline agent for a task

    Any table or function module available to get the deadline agent of a workitem ?  . Thanks, Sarath.