Changes to table not reflected in Java query

Hello All!
I'm running Oracle J Developer 11g.
I am quite new to executing .sql commands using Java and so am feeling my way around.
I used the IDE's SQL Worksheet and created some tables in a database.
I also used this SQL Worksheet to populate the tables and verified the contents as well.
Then using Java I wrote some code to issue a Select command to a table, store the contents of the query into
Some Arraylists.. etc. etc..
Anyway I then ran the program and everything seemed to work fine.
Then I ran some sql script to Insert more rows into the table.
When I do a sql query select * command, my new rows are there.
Then I run the Java program and the new rows don't seem to be there???
Now I'm stumped. Am I missing something here?
Please can anyone enlighten me?
Any help would be welcome.

Hi,
conn.setAutoCommit();Its used when you want to work in a transaction. If a connection is in a auto commit mode then all sql stmts will be executed and commited as individual tranasction. Else sql stmts are grouped into a transaction which needs to be commited by a method or rollback.
So, after your transaction completes, do return the auto commit state to true.
or
try {
// Connect to Oracle using JDBC driver
System.out.print("*** -> Connecting to -> " + connectionURL + "\n");
conn = DriverManager.getConnection(connectionURL,"SYSTEM","PASSWORD");
System.out.print("*** -> Connected as URL -> " + connectionURL + "\n");
// TURN OFF AutoCommit
//System.out.print("*** -> Turning Off AutoCommit...\n");
conn.setAutoCommit(false);
stmt = conn.createStatement (ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
System.out.print("*** -> Opening ResultsSet...\n");
results = stmt.executeQuery (sql);
conn.commit();
} catch(SQLException sqel) {
conn.rollback();
}Twinkle

Similar Messages

  • Changes to the infoobject are not reflecting in the query Desinger level.

    Hi All,
    We removed some Attributes to one characteristic and transported into QA.
    The removed attributes are not getting in BEx query designer in Dev, But we are getting those removed attributes in the context menu of that particular Char in BEx Designer in QA.
    We checked in the Characteristic level, those removed Attributes are not there in Info object level but still those Attributes are displaying in BEx designer level in QA.
    And info object showing as gray color even though we activated the info object, We think this may be the cause to not reflect the changes to BEx Designer level.
    Can any one suggest us to resolve the issue.
    Thanks & Regards,
    Raju. E

    Hi Raju
    Go to transation RSRT enter one of the reports and click to Generate Report. If this solves your problem then you can go to Environment\generate queries directly to regenerate the impacted queries.
    Cheers
    Tansu

  • Changes in .RDF not reflected in template

    Hi,
    I am wondering if anyone else has had this issue. I made a change for a function in my .RDF file and moved it to our reports directory. The change is not reflected in the BI Publisher output. Is there something else I need to do to get the template to pick up the change as well. The problem seems to be that the XML output does not change and seems to only be running the old file. Is there somewhere else I need to move the file to or does anything have to be bounced to make changes effective? Any help is greatly appreciated.

    Hi Jason,
    Check if there is a Load balancer in use...
    If the address you give to users to access EBS (http://erp.company.com:8001/) looks different from the server you upload the files onto (e.g. server1.company.com), you have good reason to suspect may be a Load balancer in use. Load balancing in EBS context means e.g. that the work load is automatically balanced between two or more application servers. In this case you would need to upload the updated file to every server used (server1.company.com, server2.company.com, etc).
    The load balancer gives assignments to the application servers according to some internal logic. You can query fnd_concurrent_requests to see which AS was assigned to carry out each request. If you have an obsolete version of the report on one AS, and new one on the other AS, whichever could be picked. Actually you may have the old one picked dozen times in a row. This could explain why the updates are not reflected when you run the concurrent program.
    Best Regards, Matilda Smeds

  • Changes in MM02 not reflecting in COPA lin item report

    Hi,
    In my project during data conversion material was grouped wrongly. We realised it later once we started designing COPA reports. The material is used by seven company codes. The basic material group defined in basic data is used by all company codes while Material group 1,2,3 4 and 5 are used by company specific defined in sales orgs 2 View in MM master(MM01).
    I am designing report for three companies by using material group 1,2,3,4 and 5.
    We tried changing the material group 1,2,3,4 and 5 for wrongly grouped materials in MM02. But in COPA report these changes are not reflecting. The grouping in report is still as per the data conversion grouping.
    Please suggest on how should we rectify our material grouping to reflect in COPA report.
    Regds

    Hi,
    in COPA reports characteristics are read from the COPA tables, they are not dynamically derived at the time of executing the report. In the COPA tables oyu will find the characteristic as derived at the moment of posting the line item.
    If the characeristic that you want to rectify is in the definition of your your COPA segments - which you can check through TC KEQ3 - then there is possibility to carry changed master data over to past COPA data.
    TC KEND allows you change the existing COPA segments according to current master data. However, it will not make changes to table CE1XXXX, where COPA line items are stored, but changes happen on the segment level (CE4XXXX).
    This means that you always see the changes in COPA reports that read from segments, but not in line item based reports.
    To change your output from line item based reports I see no other possibilty but to make correcting entries in CE1XXXX using KE21N or KEFC.
    If you should consider using KEND please read the documentation for "realignment". It can create problems, for example if you have a SAP BW that is delta-updated from CE11XXX. Also your summarization levels for COPA have to be rebuilt after KEND.

  • Regarding Conditions not reflecting in Herarchy query

    Hi Gurus,
    I have a scenario where i have created query on a multiprovider. In the query designer i have selected infoobjects like <b>region code, Director</b> ... and in columns i have selected <b>mileage,</b> .....i have also selected in the Rows as <b>Expand as Hierarchy</b>.
    The query is working fine. But the Conditions i have specified for mileage < 0 or anyother condition reflects only for region level. But it is not reflecting for Director level and subsequent lower level like manager..... In the condition i have selected for all characteristics.
    Kindly guide me to reslove the issues.
    Regards,
    Mano

    Mano,
    Depending on the characteristics you have in your report you will need to change the Conditions to look at the mixture of individual characteristics rather than All characteristics in the drill down independently.
    Open up the conditions dialogue box and make the relevant section in the "Evaluate the conditions displayed below for:"
    Regards
    Gill

  • Changes in RFC not reflecting in WebService

    Hi everyone,
    I´ve made a simple WebService using SAP-PI, that is sync. It received a request, uses a RFC to check data in SAP and then gives the response. It's working just fine.
    Now, the RFC has change - some business rule - and for some reason, it's not reflecting on my WebService. (I can see that because the response should have 3 itens but I have 4).
    I mean: if I run the RFC in the SAP R3, it returns one thing (3 itens), if I run my WebService, that calls this RFC, it's returning 'the same old data' (4 itens).
    I think I should not change anything in my SAP-PI since the input and output are the SAME. Only the RFC ABAP rule changed.
    What should I do?
    I did all sort of 'cache cleanig' already.
    I did re-import the RFC already.
    I did re-generate the WSDL already.
    Nothing... still not able to see the change in the RFC business rule.
    What should I do?
    Regards!

    Hi,
      For this need to clear matadata loaded ...
    RFC Changes not working in XI
    Check the above thread for doing the same..i.e activate the RFC channel by modifying something
    HTH
    Rajesh

  • Buyer changed Promised should not reflect in supplier portal.

    Hi,
    I am creating a PO with NBD to D30 and promised date (NBD - Transit time) to D25 and approve it.
    Now this PO goes to supplier through iSupplier.
    Supplier changes the date to D40 as new promised date.
    This goes back to Buyer and Buyer changes the Promised date and reapprove it.
    Now since FOB on buyer's side, he can decide the transit only before 1 week time of shipment. So the transit time may change 5 to 10 days or 20 days or remains 5 days only.
    Based on that, Buyer will change the promised date 1 week shipment and reapprove the PO.
    Now this change should not reflect in iSupplier. Because the pomised date may some time more than (D45) what supplier promised (D40).And this may affect their performance report (Supplier point of view)
    Please suggest, Is there workaround?
    Thanks,
    Jey

    Hi,
    As Infocube is additive and ODS is over write, if you want single value and that is addition of both first and second then compress the data in the cube. it is not possible to have latest value from the cube. in ODS it is possible to have latest value.
    Best regards,
    Malli.

  • Credit memo related Data not reflected in  BCT Query

    Hi Experts ,
    If anyone can help me .
    Problem : I have loaded data in 0SD_C03 for sales analysis. Everything is alright and all data except Credit Memo related data are showing . During the selection in query the C/D posting + Doc Categ + Net Value forms the output value for Credit memo but it is not showing . The SD doc categ has credit memo records in VBFA table . Now i don't understand why data related to Credit memo is not retrieved in the query . I am using the standard queries and std BCT objects only .If anyone have come across please share your experience .
    Theba

    Check in your Cube fact table whether you have entries with document category O - for credit memo
    If not, ensure cube has the data and your query do not have any exclusion filter dor document category O. Check in PSA also, if not there your extractor is excluding the credit memo records

  • Changes to component not reflected after transport

    We recently modified the  BT115QIT_SLSQ assignment block to rearrange some of the fields and column headers and also add in some newer standard fields. When transported up to quality, we noticed that only some of the changes came in, but others did not. Looking at the setup in the component workbench, it looks identical to the setup in DEV and we didn't receive any errors on the transport. I do  notice the View Navigation tab is now gone in quality and we were getting a "Error in runtime repository' error when we opened up the component in quality which has disappeared all of a sudden. The changes that do come in work fine.
    I tried to do a comparison between the repository.xml files between the 2 environments but they are identical. This was verified using WinMerge, a file comparison utility.
    What else could be causing the changes to the component to not reflect correctly or for that View Navigation tab to be missing?

    Hi James,
    When u transport the Enhanced component to Quality/Prod system the SICF node for that component in SICF transaction will be deactive in the target system, Activate the SICF node for all the enhanced components by right clicking in the SICF transaction manually in the Quality system, this will remove the 'Error in runtime repository' error.
    If you have added the custom fields through UI configuration tool, go to the personalize option for the view/component, select 'Reset to default' option.
    Regards,
    S Reddy

  • ABAP Users not reflecting on JAVA Users in portal

    Hi ,
    the users which i have created in abap is not getting reflecting in java , we are using PI 7.1 EHP1 application .
    Kindly help on step by step  process .

    Dear Suresh,
    Concerning the issue, please perform the following steps:
    1) Start the SAP NetWeaver Administrator.
    2) Choose  Operation Management  -> Users and Access  -> Identity Management .
    3) Assign the role LcrAdministrator to the groups SAP_J2EE_ADMIN and SAP_SLD_ADMINISTRATOR.
    4) Assign the role LcrUser to the groups SAP_J2EE_GUEST and SAP_SLD_GUEST.
    Please go through the link : http://help.sap.com/saphelp_nwpi711/helpdata/en/1d/bbf6c34ccc4c32bdd73bb36fee8cc0/frameset.htm -> 'Wizard-Based Basic Configuration of PI' -> 'Assigning application roles to user groups' for details.
    I hope this helps.
    Best Regards
    Nishwanth

  • Changes of Infoset not reflected in query

    Hi,
    We have made some changes in the infoset, which is assigned to multiple user group.
    this infoset is used by 1 query which is also assigned to above user group.
    If we execute the query in user group 'X' it is working.....however if we execute the query in user group 'Y' it is not working....
    I found that the program for the query in usergroup 'Y' does not contain the changes we made to the infoset...
    Any idea why?
    We have generated the query and infoset....

    Hi,
    conn.setAutoCommit();Its used when you want to work in a transaction. If a connection is in a auto commit mode then all sql stmts will be executed and commited as individual tranasction. Else sql stmts are grouped into a transaction which needs to be commited by a method or rollback.
    So, after your transaction completes, do return the auto commit state to true.
    or
    try {
    // Connect to Oracle using JDBC driver
    System.out.print("*** -> Connecting to -> " + connectionURL + "\n");
    conn = DriverManager.getConnection(connectionURL,"SYSTEM","PASSWORD");
    System.out.print("*** -> Connected as URL -> " + connectionURL + "\n");
    // TURN OFF AutoCommit
    //System.out.print("*** -> Turning Off AutoCommit...\n");
    conn.setAutoCommit(false);
    stmt = conn.createStatement (ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
    System.out.print("*** -> Opening ResultsSet...\n");
    results = stmt.executeQuery (sql);
    conn.commit();
    } catch(SQLException sqel) {
    conn.rollback();
    }Twinkle

  • Changes in class not reflecting on successive program runs

    Hi
    My server is linux one...
    my jsp program which is calling a class function is working fine for the first time.but if i made any changes to the class and after copied to the server, it is not working onthe successive runs.
    I cheked the size of the class file and it reflects the changes.So problem witht he jsp,to receive the class changes.can anybody help to find where is the problem
    when I copied this class to a new package and tried again, it will work on the first time. Again the changes to that class will not be reflected in jsp on successive runs.
    Regards

    My jsp code
    <%@page language="java"
         import="java.sql.*,java.io.*,mySAP.*,java.net.URL;"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>
    <%!StringBuffer stringbuffer = new StringBuffer();
         int testemp;%>
    <%
         String dofrom;
         String doto;
         String s;
         String s1;
         dofrom = request.getParameter("DOFrom");
         doto = request.getParameter("DOTo");
         ResultSet resultset;
         String flag = request.getParameter("dall");
         mySAP.JcoTest2 obj = new mySAP.JcoTest2();
         //StringBuffer sb = obj.fetchData("one", "two");
         String sb = obj.checking();
         out.println(sb);
         try {
              StringBuffer stringbuffer = new StringBuffer();
              String separator = System.getProperty("file.separator");
              String path = System.getProperty("user.dir") + separator;
         } catch (Exception e) {
              out.println("error%%%%%%%%%" + e);
    %>
    </body>
    </html>here i am calling JcoTest2 from mySAP pack...
    first time it is showing correct output of JcoTest2 .if i change JcoTest2 and copy and run .jsp is outputing the old program value.
    .I used to complie my program in local machine and copy the class file and jsp file into the server(linux).
    Regards

  • Changes in prompts not reflecting for some users

    Good Morning all,
    I have changed a number of dashboard prompts in 11.1.1.5 to default to a dynamic repos variable.
    The changes are shown on my obiee, and some other users obiee. But some users are not seeing the changes that I have made. i.e. the prompt still defaults to a hardcoded value which was the case before I changed it.
    Tried:
    -logging in and out
    -closing cursors
    -removing any saved customizations.
    Note I made the changes last week so everyone has logged in and out.
    Any ideas why this is happening?
    Thanks
    Kev

    Thanks for the swift response.
    Users have cleared browser caches,
    I have cleared obiee cache.
    Do you mean clearing the query cache via command line?
    Please note that this is dev environment so caching is turned off for obiee.
    thanks
    Kev

  • Changes in SPRO not reflected

    Hi guys,
    I'm trying to remove a service from the ESS Service Map e.g. Removing the links of "Working Time" from the ESS through SPRO and followed the steps (change position=0) I've saved the changes but they do not seem to be reflected in the Portal. Anyone have any idea what could possibily be the problem?
    Thanks,
    Zhenmin

    Hi Bala,
    please check if the SAP note 409700 is helpful for this issue.
    Regards, Franz

  • Excel file changes on PC not reflected on BT Cloud...

    This is a strange one....if I make a change to an Excel file on my laptop...it is backed up to BT Cloud ok....but if I access the file from my mobile phone...it still shows the original file without the change....BT Helpdesk stated that BT Cloud does not support Excel file changes...is this correct?...I find that astounding!

    I need to add that Word document and notepad files do not suffer from the same problem....changes are reflected ok when access from mobile device or my laptop on the cloud.

Maybe you are looking for

  • Not getting proper payment advice

    Hi, When we are runing F110, we are not getting proper payment advice. Vendor getting information on payment advice total of amount paid no invoice details are printing, if vendor having less than 4 line items in payment run. If vendor having more th

  • Filters in queries

    when a query is executed, into the data table and navigational block in the filters availables the match of  any characteristic show to select all the values present in the data master of the characteristic "Not only the values availables in the set

  • Strange mail behaviour - message sender and title do not match message

    We have a copy of mail behaving oddly - within the last 2 days 2 messages have been delivered to the inbox (on an exchange account), where on opening the message the text of the message does not match the sender and subject. Mail seems to be moving/d

  • Outlook 2013 cannot connect to local Exchange 2013 server

    Server name EXCHANGE: is Domain controller for (domainname.local), DNS server and Exchange 2013  Has UCC CA cert successfully installed for (exchange.domainname.com) External Outlook connections, Web Outlook and autodiscover work fine. local DNS poin

  • PLS-00306: wrong number or types of arguments in call to 'IS NULL'

    Hello in a nutshell, the following script doesn't work as expected: DECLARE v_Flight CORE.T_Flight%RowType := NULL; BEGIN IF (v_Flight IS NULL) THEN DBMS_OUTPUT.PUT_LINE('v_Flight is null'); END IF; END; whereby 'CORE.T_Flight' is an existing DB tabl