Problem in using JDBC Execute commands(Update & Delete Only) with af:Table

HI Everyone,
I have one issue with Updating and Deleting Row Data using JDBC Execute commands.
Suppose In My Application i have two pages, in Page 1 I have Two Command Buttons(Delete and Save) and One Input TextBox to write the String to be stored in the Database. and Page 2 where the result Table is shown and table is binded with a ViewObject, Now When User Types some String in InTB and click Save then By Programmatically I'm searching, that string is already present in database or not, if it is already exist then Save button converts in Update button and instead of inserting it allows user to Update the String already exist in database.
Everything is working fine but the problem comes when i put those all buttons on the same page where result table is present.After putting all things on the same page and When i click save button to insert new String it is Successfully inserting but when any of other action is performed like updating or Deleting the existing one.. then my application just hanged and then nothing I able to do.
Please Help me to understand this problem and give me the solution for this..
Thanks
Fizzz...

Hi frank,
Thanks to reply me...
I'm refreshing table's iterator on each command button's action to reflect the changed result... and i'm sorry i mentioned two pages in my project.. actually these are two forms in the same page..which conditionally changed its renderer properties.. its working fine when only one form is renderred and the otherside when both are rendered then it is not working.
Hope this change will help you to understand the problem.. if something else you are looking for then please tell me..
Thanks
Fizzz...

Similar Messages

  • Delete only the Fact table using process chain?

    Hi Experts,
    I have an issue,where i have to delete the contents of the Infocube.So when i drag the Process type "Delete Contents of the Data target" into the process chain.I Am able to delete the contents of the cube.
    But in my case i need to delete only the FACT table and not the DIMENSION table.The system does prompt a message to delete FACT only /FACT & DIM TAbles.
    Please advice if its possible to Delete the FACT table only using process chains
    thanks in advance

    Hi ,
    check this link ..
    http://help.sap.com/saphelp_nw04/helpdata/en/80/1a6473e07211d2acb80000e829fbfe/content.htm
    Regards,
    Shikha

  • Which user is used to execute command defined in File Adapter?

    Hello,
    in my receiver file adapter I specified a OS command to be executed after message processing. However this command doesn't get executed. After investigation I figure out that it's because the user that is used to executed the command does not have enough authorization to run the program (It's a unix system).
    So anyone knows which user is used to execute the command? Or anyone know how to go around this security issue with OS command in Unix system?
    Thanks
    Eric

    Hi,
    As Bhavesh replied you earlier the OS command is executed by the user <sid>adm in Unix or SAPService<SID> in windows.
    Do check the note 841704 - XI File & JDBC Adapter: Operating system command.
    From Note 841704
    Also note that the command is run as user "<sid>adm" (Unix) / "SAPService<SID>" (Windows).
    Thanks
    SaNv...

  • Using AppleScript "execute" command in Acrobat

    Acrobat's scripting dictionary has a cryptic description of an "execute" command that is supposed to execute a menu item "as if a user clicked it".
    No information is given as to how to identify the desired menu command except "reference". Huh? Is there documentation or a tutorial on this anywhere?
    Related question, how can AppleScript identify auxiliary windows such as the Document Properties window and its various button bar items and other fields?
    Here's one simple thing I'm trying to accomplish: I'm using System Events to script some items like keywords in the Document Properties window. Sometimes it takes several seconds for a document to open. Without putting in huge wait loops, I'd like to execute the menu item "File: Properties..." and then wait for the window to open using a loop like this:
    repeat until exists <some way to identify the Document Properties window>
    end repeat
    Any hope of doing stuff like this? I already tore out enough hair trying to get AppleScript's "do script" command to work (only lately having discovered that the script file apparently must be plain text, no Unicode).

    The Macintosh keyboard does not have a true "Enter" key any more - not on the MacBook Pro or the iBooks. Modifier keys do not seem to work either. I've turned on the System Prefs > Keyboard & made it appear in the top Menu Bar. From this menu choose "Show Keyboard Viewer" to see how keys + Return are displayed. Only the Function key changes the Return key. Function + Delete is a forward delete. But Function + Return is just another Return. So any highlighted text is deleted! Command + Return stays on the same line and selected text remains. I will try KeyRemap4MacBook utility then consider buying a USB numeric keypad. Urggh.

  • Execute Command "Update Data" of dynamic graphic xls with Java?

    hi, i want to write datas in tthe xls sheet, i have in other sheet from same file xls a dynamic graphic, and i want to update de graphic with the new datas writed, how can to execute the command "Update Data" in the dynamic graphi sheet??
    tnk for your help.
    HL

    You missed a space in the string after your WHERE clause.
    put an extra space after the 'WHERE' in your execute immediate statement.
         EXECUTE IMMEDIATE
              'UPDATE '|| affectedtable|| ' SET '|| affectedcol || '= :nvalue'||
              ' WHERE '|| affectedcol || '= :ovalue'
              USING newvalue, oldvalue ;

  • Problem when using Call FM IN UPDATE TASK.

    we plan to update ztable using Call FM in update task, and write the success/error message into log.
    Does below is right??  I found the commit work can not be used here. Thanks..
    CALL FUNCTION 'ENQUEUE_ETABLE'.
    IF sy-subrc = 0.
    CALL FUNCTION 'update_ztable'' IN UPDATE TASK.
    Endif.
    COMMIT WORK and wait.
    IF sy-subrc <> 0.   
         ROLLBACK WORK.
         write error log.
    Else.
        Write successful log.
    Endif.
    CALL FUNCTION 'DNQUEUE_ALL'.

    Hi ,
    Please see the refernce of UPDATE FUNCTION MODULES:
    UPDATE FUNCTION MODULE
    -In the attributes tab, under processing type, choose Update Module, 
    Start Immediately. Define your import parameters, enter the source
    code, All validations should have been done prior to the call to this
    function module, so all you need in the source, is the updating of the
    database, INSERT, MODIFY, UPDATE, whatever.
    -When you call you function module, use IN UPDATE TASK, after the call, 
    COMMIT WORK. The commit work will trigger the db update.
    Why do we use this " In Update Task " ??
    The main update technique for bundling database changes in a single  
    database LUW is to use CALL FUNCTION... IN UPDATE TASK.
    How do we Use ??
    A typical R/3 installation contains dialog work processes and at least one update work process. The update work processes are responsible for updating the database. When an ABAP program reaches a COMMIT WORK statement, any function modules from CALL FUNCTION... IN UPDATE TASK statements are released for processing in an update work process. The dialog process does not wait for the update to finish. This kind of update is called asynchronous update.
    What is the Use... ??
    Asynchronous update is useful when response time from the transaction is critical, and the database updates themselves are so complex that they justify the extra system load
    Real time scenario.
    Suppose a user wants to change an entry in a database table, or add a new one. He or she enters the necessary data, and then starts the update process by choosing Save. This starts the following procedure in the ABAP program:
    Firstly, the program locks the database entry against other users, using the enqueue work process (or the message server in the case of a distributed system). This generates an entry in the lock table. The user is informed whether the update was successful, or whether the lock could not be set because of other users.
    If the lock is set, the program reads the entry that is to be changed and modifies it. If the user has created a new entry, the program checks whether a record with the same key values already exists.
    In the current dialog work process, the program calls a function module using CALL FUNCTION... IN UPDATE TASK, and this writes the change details as an entry in table VBLOG.
    When the program is finished (maybe after further dialog steps), a COMMIT WORK statement starts the final part of the SAP LUW. The work process that is processing the current dialog step starts an update work process.
    Based on the information passed to it from the dialog work process, the update work process reads the log entries belonging to the SAP LUW from table VBLOG.
    The update work process passes this data to the database for updating, and analyzes the return message from the database. If the update was successful, the update work process triggers a database commit after the last database change and deletes the log entries from table VBLOG.
    If an error occurred, the update work process triggers a database rollback, leaves the log entries in table VBLOG, flags them as containing errors, and sends a SAPoffice message to the user, who should then inform the system administrator.
    The corresponding entries in the lock table are reset by the update work process.
    Q:We are calling Sales Order Change in update task inside the user Exit MV50FZ1. We can see that the FM is called in update task after the commit work and the return of the FM shows the success message. But still the changes are not saved to the DB.
    A: check sm21 or sm13 to see if the update was successful  .. In SM21 I checked. It is giving me the error Transaction Failed
    Reward if useful
    Thanks
    Jagadeesh.G

  • Using Sent Unix Command in ARD 3 with proxy authentication

    I'd like to use Unix commands to update Apple software through ARD thus allowing me to lock the computer screen before the process using the ARD command to do so, thus keeping the users from interfering with the process .
    Our network utilizes password protected firewall proxy that hangs ARD when using the softwareupdate command through ARD's "Send Unix Command..." at the point in which it would ask for authentication if using the same command in the terminal.
    Is there a Unix/terminal script or a series of script commands that could be modified to wait and enter the appropriate authentication at the previous mentioned prompt?
    I've researched this topic on this forum and discover a few post that states it is not possible but they are fairly old posts so I am hoping ARD 3 has some scripts or commands that can pass thru a username and password

    Welcome,
    I use the "System Events" handler, e.g.:
              tell application "System Events" to delay 5.5
              tell application "System Events" to keystroke "K"
              tell application "System Events" to delay 0.5
              tell application "System Events" to keystroke return
    Regards,
    Shawn

  • Connect role allows user to update/delete row of a table of another schema

    I am using oracle 9i r2, I created a user and only give him CONNECT role. Then I opened the sqlplus and found that he could query table of another schema which doesn't belong to the new user, but the thing which scares me most is that when I tried to update/delete a row from a table of another schema, it succeeded. Also, I created a new role with system priviledges CREATE_SESSION and SELECT_ANY_TABLE then granted to new user and revoked the CONNECT role but the same thing happened like before. What I am doing wrong? By the way, I am trying to create a read only user. Any help is greatly appreciated.

    Thanks guys for the tips. I have forgotten to mention that this situation happened only in a new created schema which has only a table and the table was exported from another oracle db( I pre-created the user with connect role and assign the tablespace etc), the import worked fine. Then I used a read only user(in different schema) to update/delete row to the imported table.The read only user can't update/delete other schemas besides from the new one. Is that I missed something when importing the table or pre-create user, tablespace, etc? Thanks in advance.

  • How to get last insert/update/delet row of a table?

    I hava a table A and table B which is a copy of A. I want to create a trigger to record the changes of A in B. So every time inserting/updating/deleting A I record the row inserted/updated/deleted in B, But I can't find a effiencial way to get the latest row changed.
    So is there any sys_var in oracle table like cur_rowid or something to record the latest inserted/updated/deleted in a table? I don't want to check a index or a table to get the max_seq_id again.

    user11228816 wrote:
    I hava a table A and table B which is a copy of A. I want to create a trigger to record the changes of A in B. So every time inserting/updating/deleting A I record the row inserted/updated/deleted in B, But I can't find a effiencial way to get the latest row changed.
    So is there any sys_var in oracle table like cur_rowid or something to record the latest inserted/updated/deleted in a table? I don't want to check a index or a table to get the max_seq_id again.Sounds like an ugly requirement, any reason you're not going for materialized views or advanced replication here?

  • Problem in using /SAPAPO/OM_ORDER_CHANGE to update characteristics

    Hi all
    I am having problem in updating orders in the live cache using FM /SAPAPO/OM_ORDER_CHANGE .
    The FM is used to update the one of the characteristics of the orders from eg A -> B .
    I have populated values in the FM as such
         CALL FUNCTION '/SAPAPO/OM_ORDER_CHANGE'
            EXPORTING
              is_gen_params          = gs_gen_params
              iv_simsession          = g_simsession
              is_atp_info            = gs_atp_info
              it_order_method        = gt_order_method
              it_ordmaps             = gt_ordmap_tab
              it_ordkeys             = gt_ordkey_tab
              it_charact_req_inpnode = gt_char_req
              it_charact_val_outnode = gt_char_val
            IMPORTING
              et_rc                  = gt_rc
              et_changed_orders      = lt_changed_ord
            EXCEPTIONS
              lc_connect_failed      = 1
              lc_com_error           = 2
              lc_appl_error          = 3
              OTHERS                 = 4.
    H/w, i am not getting any errors (gt_rc is  initial) and the characteristics of my orders are not updated
    And I am at my wits ends to figure out what I didnt do or need to do .
    Anyone got any ideas ?
    Thanks so much

    Hello Lina ,
    it depends on what params u are passing to that FM , can u get details by using /SAPAPO/OM_ORDER_DISPLAY/** or some FMs by passing the same params,if u are able to get the detaills then u are able to change details as well.
    regards
    prabhu

  • Getting TNS problem while using SQLLDR unix command

    I have ons shell file (finalloader1.sh) which contains below lines of code to load a text file (data.txt) into an oracle table.
    export ORACLE_HOME=/opt/oracle/product/11.2.0.3/client
    export TNS_ADMIN=/sys_apps/admnapps/loadingplace/bin
    export ORACLE_SID=d_btgen
    export PATH=/opt/oracle/product/11.2.0.3/client/bin:$PATH
    ## SQL*Loader command to execute the loading of data from data.txt into oracle table   ##
    function sql_load
            sqlldr /@d_btgen, control=/sys_apps/admnapps/loadingplace/bin/load.ctl, log=/sys_apps/admnapps/loadingplace/in/load.log, errors=100
            result=$?
            check_for_error ${result} 101
    function sql_script
            sqlplus /@d_btgen @/sys_apps/admnapps/loadingplace/bin/update_insert.sql
            result=$?
            check_for_error ${result} 102
    exec     
            sql_load
            sql_script
    See the text file (data.txt) format below , which I am trying to load (note that seperator is pipe operator)
    hafees|hamsa||hafees hamsa|39879|+1234|[email protected]|consultant|Professional|215010||2013-08-12||A||sdfgt2
    See the controller file (/sys_apps/admnapps/loadingplace/bin/load.ctl) below.
    LOAD DATA                                                                      
    INFILE '/sys_apps/admnapps/loadingplace/in/data.txt'                                              
    BADFILE '/sys_apps/admnapps/loadingplace/in/bad.bad'                                            
    DISCARDFILE '/sys_apps/admnapps/loadingplace/in/dsc.dsc'                                        
    DISCARDMAX 5                                                               
    INTO TABLE emp_data FIELDS TERMINATED BY '|'
      name_last"upper(:name_last)"
    , name_first"upper(:name_first)"
    , c_middle_initial"upper(SUBSTR(:c_middle_initial, 1, 14))"
    , emp_name"upper(:emp_name)"
    , em_number
    , phone
    , email
    But problems comes here when I am executing my shell file (finalloader1.sh). See the error below.
    SQL*Loader: Release 11.2.0.3.0 - Production on Fri Aug 30 07:06:54 2013
    Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
    SQL*Loader-704: Internal error: ulconnect: OCIServerAttach [0]
    ORA-12154: TNS:could not resolve the connect identifier specified
    ERROR invoking SQL*Loader in function sql_load.
    finalloader1.sh: line 68: print: command not found
    Shell Script UNSUCCESSFULLY ENDED with a return code of (1) at \c
    08/30/2013/07:06:54 AM
    I am not understanding the issue. I googled this many times but came to know that there is some configuration issue in tnsnames.ora file. But as per my knowledge I have done every settings those I know. See my tnsnames.ora file below.
    d_btgen.world=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rwad10.rw.discoverfinancial.com)(PORT=1576))(CONNECT_DATA=(SERVICE_NAME=d_btgen.dfs.us)))
    Any one of you can help me on this. You timely help is well appreciated.

    Hi,
    At first look it just seems that in your shell script you have d_btgen but in your tnsnames you have  d_btgen.world
    You need to either add .world to you shell script, remove .world from your tnsnames or add the parameter name.default_domain=world in your sqlnet.ora
    Cheers,
    Harry

  • How to run insert/update/delete from CDC Change table to target using OWB

    I am planning to set up CDC and publish CDC change table as source data into to OWB. I have come across where I am confused how to apply changes from CDC change table to target database using OWB. For i.e. change tables is containing information like
    operation$, cscn$,commit_timestamp$,xidusn$,....,list of column name
    D,12323223,8/28/2008 1:44:32PM,24,.....,list of column value that have to be deleted from target
    UO,12323224,8/28/2008 1:45:23PM,24,.....,list of column value that have to be updated in target.
    Please advice or give me some hint. Thank you.

    Hi,
    you can wait for 11gR2 with CDC integration or build most of the code outside the owb. To use CDC you must do this things (http://www.oracle.com/technology/oramag/oracle/03-nov/o63tech_bi.html):
    1. Identify the source tables.
    2. Set up a publisher.
    3. Create change tables.
    4. Set up a subscriber.
    5. Subscribe to the source tables, and activate the subscription.
    6. Set up the CDC window.
    7. Prepare a subscriber view.
    8. Access data from the change tables.
    9. Drop the subscriber view, and purge the CDC window.
    10. Repeat steps 6 through 9 to see new data.
    You can do only a few of this inside owb, most of it must be done outside.
    Regards,
    Detlef

  • Facing problem while using JDBC Storage option in FileStoreProvider

    HI all,
    We are using oracle 11.1.1.6.0 version and 11.2.0.1.0 of Oracle Database 11g Enterprise Edition.
    In order to use the JDBC storage option , we are follwing the below steps:
    1. On your Content Server instance, install and enable the FileStoreProvider component.
    2. Configure FileStoreProvider to create a JDBC storage rule as desired.
    3. Upon restart of Content Server, FileStoreProvider will create the table to store files.
    4. Log into the database instance for Content Server
    5. Drop the filestorage table created by FileStoreProvider (which uses Basic LOBs)
    6. Recreate the filestorage table to leverage SecureFiles.
    Here is a *sample*
    CREATE script: CREATE TABLE filestorage ( DID number(38), DRENDITIONID VARCHAR2(30), DLASTMODIFIED TIMESTAMP(6), DFILESIZE NUMBER(38), DISDELETED VARCHAR2(1), BFILEDATA BLOB, CONSTRAINT PK_FILESTORAGE PRIMARY KEY (DID, DRENDITIONID)) LOB(BFILEDATA) STORE AS SECUREFILE TABLESPACE ;
    Now when we checked in a new item in the content server, the details of the content is not getting updated in the DB.
    Please provide your inputs. Do we need to do any other configuration changes?
    Thanks in advance,

    Could you please specify what you mean by "the details of the content is not getting updated in the DB"?
    Does it mean that the checkin service fails? Or, it succeeds (you can verify from gui that both metadata and content were updated), but you cannot find updates in the database?

  • Problem when using JDBC with JSP

    Hi,
    I am trying to display results after a database query on a JSP page, and then provide the options delete or update one of these records or to add a new one.
    What I did was to pass the ResultSet object to the webpage, and then display the result. When the buttons are pressed, I pass this ResultSet to another jsp page where I provide the required functionality. This is then forwarded back to the previous JSP, where the new data is displayed.
    However, when the first page is re-displayed, it creates a new connection and i was wondering if there is a way to close the previous connection through the ResultSet?
    Also, I wanted to put the ResultSet in a bean, but I think it is causing an error in the web server, saying something like it is not Serializable. Is there any other way to pass the ResultSet around?
    Any suggestions on better ways to manage databases though web interfaces would be welcome, or if someone could point me to a good tutorial on this topic!
    cheers
    Ankur

    Bad idea to be passing ResultSets around. Those are database cursors, a scarce resource.
    You should load that data into a data structure, close the ResultSet immediately, and then pass the data structure around in session if you must.
    Better yet, have a central servlet that deals with all database calls. Let the JSPs just do display, as they were meant to. - MOD

  • Problem while using jdbc in package

    This is a package .... all the three programs work induvidually but if put in a package gives the error invalid cursor state
    Program 1
    import bank.*;
    import java.io.*;
    public class BankAccount
         double Acc_Bal;
         public static void main (String ar[])
         int option;
         try
              BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
         do
              System.out.print("Enter your Choice \n=================\n 1.New Coustomer \n 2.Existing coustomer \n 3.Exit \n\n >>");
              option = Integer.parseInt(br.readLine());
              switch(option)
                   case 1:
                        NewCou NC = new NewCou();
                        break;
                   case 2:
                        ExisCou EC = new ExisCou();
                        break;
                        case 3:
                             System.exit(0);
                             break;
                        default:
                             System.out.println("Invalid Entry");
                             break;
              }while(option<3);
         catch (IOException ie)
    program 2
    package bank;
    import java.io.*;
    import java.sql.*;
    class NewCou
         String Acc_Holder,Acc_Type,Query;
         Connection con;
         ResultSet rs;
         int Acc_Num;
         NewCou ()
              try
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              con = DriverManager.getConnection("jdbc:odbc:ranjith","scott","tiger");
              Statement stmt = con.createStatement();
              rs = stmt.executeQuery("select acc from Coustomer");
              while (rs.next()==true)
                   Acc_Num=rs.getInt(1);
                   System.out.println(Acc_Num);
              Acc_Num = Acc_Num+1;
              BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
              System.out.print("Enter Coustomer details \n Enter Coustomer Name >> ");
              Acc_Holder=br.readLine();
              System.out.print("Enter Account type >> ");
              Acc_Type = br.readLine();
              System.out.println("Account Number Alloted >> "+Acc_Num);
              System.out.println("Account balance >> 0.00");
              Query ="insert into Coustomer values ('"+ Acc_Holder +"',"+ Acc_Num +","+0+",'"+Acc_Type+"')";
              stmt.executeQuery(Query);
              catch (IOException ie){}
              catch (ClassNotFoundException ce){}
              catch (SQLException se){}
    /*public static void main (String args[])
         NewCou nc = new NewCou();
    program 3
    package bank;
    import java.sql.*;
    import java.io.*;
    class ExisCou
              String Query,name,type;
              ResultSet rs;
              int st,bal;
              ExisCou()
                   try
                             BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                             System.out.println("Enter Account number >> ");
                             st = Integer.parseInt(br.readLine());
                             Query = "select * from Coustomer where acc like "+st;
                             System.out.println(Query);
                             Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                             Connection con = DriverManager.getConnection("jdbc:odbc:ranjith","scott","tiger");
                             Statement stmt = con.createStatement();
                             rs = stmt.executeQuery(Query);
                             rs.next();
                             if (rs == null)
                             System.out.println("Invalid Account Number "+rs);
                             else
                             name=rs.getString(1);
                             bal = rs.getInt(3);
                             type=rs.getString(4);
                             System.out.println(" Name : "+name );
                             System.out.println(" Account Number : "+st );
                             System.out.println("Balance : "+bal);
                             System.out.println("Account type : "+type);
                                  catch (IOException ie){}
                                  catch (NullPointerException ne)
                                       System.out.println("Invalid Account Number");
                                       ExisCou ex = new ExisCou();
                                  catch (SQLException se){System.out.println(se);}
                                  catch (ClassNotFoundException ce) {}
         /*public static void main (String args[])
              ExisCou ec = new ExisCou();
         }

    any body help me please

Maybe you are looking for

  • HP Officejet Pro 8600 Plus e-All-in-One Printer - N911g power surge

    Had a power surge on the printer due to a storm. Now the printer won't power up. Tried plugging it in a different electrical outlet, but it still won't power up. Is there a way to reset the internal power supply since I assume there is some type of s

  • Hyperlink in obiee email reports

    Hi, Well I have a question on hyperlink in obiee dashboards. The requirement is to email obiee Report or dashboard with Hyperlink enabled on date column which opens up PDF from the server for that date. End user will not access obiee analytics at all

  • My I Phone 5 Screen shows bright white apple logo on black background continuously

    My I - Phone 5 is continuously showing white apple logo on black background. It started this morning after my phone was charging overnight.

  • Use of BP selection option in DEPOSIT

    Hi, What is the use of BP option in deposit screen Deposit -> Below the "Deposit Currency" -> Drop down contain 2 values "Bank Account" ,"BP" I know the use of "Bank Account" I want to know the use of "BP". Please explain me with one Scenario, so tha

  • Time Machine destination not resolvable?

    Time Machine/Time Capsule has been working flawlessly until 2/24 when I started receiving the following error message: "The problem may be temporary. Try again later to back up. If the problem persists, use Disk Utility to repair your backup disk." I