SELECT,UPDATE, DELETE With JDBC Adaptor

Dear All,
I need to execute few Select, update and Delete statement by using JDBC Adaptor.
Suppose While select statement no records selected.
During Update no records exsist with specified key so no update possible.
During delete if no record found with specified key so no deletion possible.
In above cases do I get any error, any where in XI . Either in SXMB_MONI or in RWB.
Regards,
Raghvendra

Hi
You will be getting SQL error in RWB and not processed flag in SXMB_MONI
Along with this you can use OS level command STDOUT and STDERR to write out the trace.
using JDBC you can even use following Isolated setting.
·        Default (default setting of the respective database)
·        None
·        read_uncommitted (weakest setting)
·        read_committed
·        repeatable_read
·        serializable (strongest setting)
You must only lower the isolation level where necessary and as far as necessary. To avoid data inconsistencies in the database when the isolation level is lowered, ensure that multiple database transactions cannot access the database simultaneously.
With this Do not set Auto Commit enabled indicator if the JDBC driver supports transactions.
Thanks
Gaurav Bhargava

Similar Messages

  • Execution time difference between SELECT & UPDATE statement in JDBC Sender.

    Hi Experts,
    In my scenario, I have used the JDBC Sender Adapter with the SELECT and UPDATE statement.
    Now the problem is in between the execution of Select and update statement, few more entries are coming in the same DB Table.
    So result of this is updation take place for those entries which are not even picked up by the select statement.
    Can we avoid this execution time difference between the SELECT & UPDATE statemet on JDBC Sender side???
    Thanks & Regards
    Jagesh

    Hi
    Use serializable option in additional parameters, now all new entries would also be updated.

  • Making  Statistics to Discover the use % of Select/Update/Delete

    Hi,
    I have a small database, and I'd like to do a Statistics about the use of Select/Update/Delete. I hear about two ways.
    1-) Using Audit
    2-) Reading the Archives though package DBMS_LOGMner
    What way do u suggest to me ?
    If anyone have links and more information how I can do this statistics, could post it here ?
    Thank you.
    Fernando.

    2-) Reading the Archives though package DBMS_LOGMnerWell, if the database is not in archivelog mode, you can only read the online redo logs, therefore, missing the historical information.
    The best and simpliest solution to implement auditing.
    Jaffar
    Message was edited by:
    Syed Jaffar

  • How to determine different errors during update database with JDBC 2.0

    During updating my database (MS Access 2000) using JDBC 2.0, I entered a value for the primary key field which has existed
    in the database. However, when executing the method "udpateRow()" it gives me an error message "Error in row" and the
    database was not updated.
    When I update an Integer field with a non-integer value (e.g: Characters ), it also gives me the same error message. When I
    update a Date field with a non-date value, it still displays the same error message.
    How can I determine for each of the cases from the SQLException thrown that the actual error has occurred since I want to
    display a different customized message indicating the different errors that occurred during updating??
    Currently, part of my code is as follows:
              int currentRow = rs.getRow();
              String values[] = new String[ rsmd.getColumnCount() ];
              // Initialize values[] begins here:
              for( int count = 1; count <= rsmd.getColumnCount(); count++ ) {
                   rs.updateObject( count, values[ count - 1 ] );
              try{
                   rs.updateRow();
              catch( SQLException e ) {
                   System.out.println( e.getMessage() );
                   rs.cancelRowUpdates();
                   rs.absolute( currentRow );
    Can someone please help me solve this problem?? THANKS.. :)

    Rather than attempting to figure out which column value causes the update to fail, I would try validating the input data before you attempt to use it in a SQL update. Of course, this would only be useful if you know what data types the inputs are supposed to be in advance of running the update.
    William

  • Update problems with jdbc on access db too

    hi..
    i have a strange problem with updating a record in ms-access - db by using jdbc.
    my program creates a "correct??" update-statement but i get an error-message: errorcode:3144.. syntaxerror in update-statement or something like that..
    thats the statement that my program creates:
    update maX2 set m1='super',set m2='hallo' where id=2
    java-code:
    Statement stmt = con.createStatement();
    stmt.executeUpdate(... the update-statement ...);
    does anybody know why i get this errormessage?

    Your statemente should be:
    update maX2 set m1='super', m2='hallo' where id=2
    HTH

  • Two select query in sender JDBC adaptor

    Hi
    We are doing JDFC-RFC scenario, in which i need to fetch the data from two tables (header  and item table) whch correspondes to the 2 table parameter of RFC .
    Any clues how to configure sender jdbc CC having  2 select query ??????
    Regards
    Vijay

    Swatantra,
    You can have a look at the below URL for more info on JOIN.
    http://www.w3schools.com/sql/sql_join.asp
    Best regards,
    raj.

  • PROBLEM WITH Select * from table_name with JDBC

    Hello,
    I am using thin driver. The problem that i am having is as
    follows.
    when i execute select * from any_table_name from within java
    code i only get FIRST row back. I am using Employee.java example.
    Is there something else i should do?
    Alex
    null

    Hi Alex,
    I am writing a client application with Java. Everything works
    really well, but - same problem as you had (I know, you solved it
    - that's why I'm writing :) - reading only first column. Actually
    it works fine on its own, but when embedded in my java app -
    that's when I get the first column displayed.
    Also executing "select * from emp;" gives me a sequence of
    numbers (displayed in columns) 20, 30, 30 etc, which are in fact
    present as one of the columns when running this query without
    java.
    I appreciate your help!
    Malgosia
    Alex Korneyev (guest) wrote:
    : Hello,
    : I am using thin driver. The problem that i am having is as
    : follows.
    : when i execute select * from any_table_name from within java
    : code i only get FIRST row back. I am using Employee.java
    example.
    : Is there something else i should do?
    : Alex
    null

  • Update statement with case statement

    Hi
    The following code is thorwing an error like
    =====CODE==========
    BEGIN
    UPDATE emp SET SAL = CASE
    WHEN ENAME = 'SCOTT' THEN SAL = 300
    ELSE NULL;
    END CASE;
    END;
    =====ERROR=======
    ORA-06550: line 3, column 32:
    PL/SQL: ORA-00905: missing keyword
    ORA-06550: line 2, column 2:
    PL/SQL: SQL Statement ignored
    ORA-06550: line 5, column 6:
    PLS-00103: Encountered the symbol "CASE" when expecting one of the following:
    ; 1.
    2. BEGIN
    3. UPDATE emp SET SAL = CASE
    4. WHEN ENAME = 'SCOTT' THEN SAL = 300
    5. ELSE NULL;
    Any suggession?
    Regards
    Balaji

    Hi,
    Yes you are right, but it is not working for the multiple case statement like the following code
    BEGIN
    UPDATE emp SET SAL = CASE
    WHEN ENAME='JONES' THEN '4';
    WHEN ENAME='BLAKE' THEN '5'
    WHEN ENAME='CLARK' THEN '6'
    WHEN ENAME='TURNER' THEN '7'
    WHEN ENAME='MILLER' THEN '8'
    WHEN ENAME='MARTIN' THEN '9'
    WHEN ENAME='WARD' THEN '10'
    WHEN ENAME='ADAMS' THEN '11'
    WHEN ENAME='JAMES' THEN '12'
    WHEN ENAME='SMITH' THEN '13'
    ELSE NULL END;
    END;
    The above code show the following error
    ===========ERROR==========
    ORA-06550: line 3, column 29:
    PL/SQL: ORA-00905: missing keyword
    ORA-06550: line 2, column 2:
    PL/SQL: SQL Statement ignored
    ORA-06550: line 4, column 2:
    PLS-00103: Encountered the symbol "WHEN" when expecting one of the following:
    ( begin case declare end exception exit for goto if loop mod
    null pragma raise return select update while with
    1. BEGIN
    2. UPDATE emp SET SAL = CASE
    3. WHEN ENAME='JONES' THEN '4';
    4. WHEN ENAME='BLAKE' THEN '5'
    5. WHEN ENAME='CLARK' THEN '6'
    Regards
    Balaji
    Edited by: 904493 on Jan 13, 2012 4:18 AM

  • BUG JSF h:dataTable with JDBC ResultSet - only last column is updated

    I tried to create updatable h:dataTable tag with three h:inputText columns with JDBC ResultSet as data source. But what ever I did I have seceded to update only the last column in h:dataTable tag.
    My JSF page is:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1250"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <f:view>
    <html>
    <head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1250"/>
    <title>Stevan</title>
    </head>
    <body><h:form>
    <p>
    <h:messages/>
    </p>
    <p>
    <h:dataTable value="#{tabela.people}" var = "record">
    <h:column>
    <f:facet name="header">
    <h:outputText value="PIN"/>
    </f:facet>
    <h:inputText value="#{record.PIN}"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Surname"/>
    </f:facet>
    <h:inputText value="#{record.SURNAME}"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Name"/>
    </f:facet>
    <h:inputText value="#{record.NAME}"/>
    </h:column>
    </h:dataTable>
    </p>
    <h:commandButton value="Submit"/>
    </h:form></body>
    </html>
    </f:view>
    My java been is:
    package com.steva;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    public class tabela {
    private Connection conn;
    private ResultSet resultSet;
    public tabela() throws SQLException, ClassNotFoundException {
    Statement stmt;
    Class.forName("oracle.jdbc.OracleDriver");
    conn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe", "hr", "hr");
    stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
    resultSet = stmt.executeQuery("SELECT PIN, SURNAME, NAME FROM PERSON");
    public ResultSet getPeople() {
    return resultSet;
    I have instaled “Oracle Database 10g Express Edition Release 10.2.0.1.0” – product on my PC localy. I have enabled HR schema and I have instaled and pupulated with sample data folloving table:
    CREATE TABLE "PERSON"
    (     "PIN" VARCHAR2(20) NOT NULL ENABLE,
         "SURNAME" VARCHAR2(30),
         "NAME" VARCHAR2(30),
         CONSTRAINT "PERSON_PK" PRIMARY KEY ("PIN") ENABLE
    I have:
    Windows XP SP2
    Oracle JDeveloper Studio Edition Version 10.1.3.1.0.3894
    I am not shure why this works in that way, but I think that this is a BUG
    Thanks in advance.

    Hi,
    I am sorry because of formatting but while I am entering text looks fine but in preview it is all scrambled. I was looking on the Web for similar problems and I did not find anything similar. Its very simple sample and I could not believe that the problem is in SUN JSF library. I was thinking that problem is in some ResultSet parameter or in some specific Oracle implementation of JDBC thin driver. I did not try this sample on any other platform, database or programming tool. I am new in Java and JSF and I have some experience only with JDeveloper.
    Java been(session scope):
    package com.steva;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    public class tabela {
    private Connection conn;
    private ResultSet resultSet;
    public tabela() throws SQLException, ClassNotFoundException {
    Statement stmt;
    Class.forName("oracle.jdbc.OracleDriver");
    conn = DriverManager.getConnection
    ("jdbc:oracle:thin:@localhost:1521:xe", "hr", "hr");
    stmt = conn.createStatement
    (ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
    resultSet = stmt.executeQuery("SELECT PIN, SURNAME, NAME FROM PERSON");
    public ResultSet getZaposleni() {
    return resultSet;
    JSF Page:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1250"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <f:view>
    <html>
    <head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1250"/>
    <title>Stevan</title>
    </head>
    <body><h:form>
    <p>
    <h:messages/>
    </p>
    <p>
    <h:dataTable value="#{tabela.zaposleni}" var = "record">
    <h:column>
    <f:facet name="header">
    <h:outputText value="PIN"/>
    </f:facet>
    <h:inputText value="#{record.PIN}"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Surname"/>
    </f:facet>
    <h:inputText value="#{record.SURNAME}"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Name"/>
    </f:facet>
    <h:inputText value="#{record.NAME}"/>
    </h:column>
    </h:dataTable>
    </p>
    <h:commandButton value="Submit"/>
    </h:form></body>
    </html>
    </f:view>

  • Select and update rownum sender jdbc

    Dear all
    i am using PI 7.31 sender jdbc adapter.
    table(TB_AA)  has 10000 row with pi_stat = 'R'   and then  sender jdbc adapter tried  10 row  in using rownum  every  120 second and update same rownum
    but  result of select query and udpate query  were different.  not same record update for selecting data.
    co_cd,  memid  is PK.
    select co_cd , mem_id,  reg_n  FROM TB_AA  where PI_STAT = 'R' AND rownum <= 10
    update  TB_AA  set  PI_STAT = 'S', where  PI_STAT = 'R' and rownum <= 10
    query is wrong?  ,  what is correct update query with several PK ?

    Hi Arten Solohin.
    co_cd,  memid  is Primary Key.
    select co_cd , mem_id,  reg_n  FROM TB_AA  where PI_STAT = 'R' AND rownum <= 10
    update  TB_AA  set  PI_STAT = 'S', where  PI_STAT = 'R' and rownum <= 10
    could you make your query with above my query ?  because i am confusing ORDER BY <your unique id_field>   AND LINE_ID ....
    will be highly appreciated  in advance
    thanks you very much.

  • Hello there - how can I share my iTunes library between two users on the same computer? I put the library in a shared folder between both and have selected this library on both as well, but when I update iTunes with music etc it only appears on one?

    Hello there - how can I share my iTunes library between two users on the same computer? I put the library in a shared folder between both and have selected this library on both as well, but when I update iTunes with music etc it only appears on one?

    Thank you Joe - I tried this but it's only showing a teensy amount of music - the stuff on the second users account as opposed to the giagntic library on the 'main' account. I actually went to a Genius Bar and they said that apple doesn't really want you to share music between accounts - parents don't want to hear their kids music etc. Which seemed strange, but it might be the case sadly   Thanks anyway!

  • How can I delete apps from the app store? There seems to be every app I have ever downloaded and deleted since I got my phone in 2007. When I go to app store and select update apps there's a menu at the top that says purchased! I would like to delete hist

    How can I delete apps from the app store? There seems to be every app I have ever downloaded and deleted since I got my phone in 2007. When I go to app store and select update apps there's a menu at the top that says purchased and when I select it it shows every app I've ever had! I would like to delete the history please.
    Many thanks

    You cannot.
    The entire point of this is that you can redownload any and all of your past purchases.

  • How can I select and delete the fill color (white background) of a live trace (B&W) with in an actio

    How can I select and delete the fill color (white background) of a live trace (B&W) with in an action set?
    Illustrator CS4 in windows XP.

    Maybe Li[ve trace] is not t]he way[ to go
    I have some suggestion one leave it as is and use a blending mode of multiply to give it a color background like this
    leave it as is make it a grayscale tiff import int Illustrator and color it it in Illustrator like this
    Or trace over it with the brush tool aand then give it a color ground.
    Or do the original over and do a cleaner job with no tone or a minimum of tone. Then Live trace.

  • Sender JDBC Adapter Select/Update Issue

    Dear All,
    We have configured a Sender JDBC Adapter to Poll data from the DB2 tables. It is working fine and both the select and the update queries written are also getting properly executed and are changing the status of the flag from Y to N once read from database.
    In the communication channel ->
    select * from <table> where flag = 'N'.
    update <table> set flag = 'Y' where flag = 'N'.
    But I have one doubt after executing the select query some new data comes into the table of status flag 'N"., then will this unselected data will also be updated to 'Y' .
    The question is while we do a select and update from XI on the DB table and at the same time there is an insert happening into the table from the other end how will the adpater behave in this case.Will it result in missing of some records during next select/update transaction from XI..
    Your inputs will be appreciated.
    Regards
    Amit

    Amit
    Did you ever get a solution to your question ?
       Sender JDBC Adapter Select/Update Issue  
    Posted: Apr 24, 2008 2:29 PM           Reply 
    Dear All,
    We have configured a Sender JDBC Adapter to Poll data from the DB2 tables. It is working fine and both the select and the update queries written are also getting properly executed and are changing the status of the flag from Y to N once read from database.
    In the communication channel ->
    select * from <table> where flag = 'N'.
    update <table> set flag = 'Y' where flag = 'N'.
    But I have one doubt after executing the select query some new data comes into the table of status flag 'N"., then will this unselected data will also be updated to 'Y' .
    The question is while we do a select and update from XI on the DB table and at the same time there is an insert happening into the table from the other end how will the adpater behave in this case.Will it result in missing of some records during next select/update transaction from XI..
    Your inputs will be appreciated.
    Regards
    Amit

  • How can I edit imported audio track? After selecting and deleting region and joining remaining parts, it keeps playing the track with the deleted part! What am I doing wrong?

    How can I edit imported audio track? After selecting and deleting region, and joining remaining parts, it keeps playing the track with the deleted region!
    What am I doing wrong?

    After selecting and deleting region, and joining remaining parts, it keeps playing the track with the deleted region!
    What am I doing wrong?
    How exactly are you doing this?
    When I cut out a part of an audio region, then drag the remaining parts together, so they are touching, the track will skip the cut out section when playing the file.  Also, if I select the remaining parts of the region and use the command "Edit > join regions". This will create a new audio file with the cut out part deleted.
    You should see this prompt, when you are joining the regions:

Maybe you are looking for

  • How do I move my TABS below the address bar WITHOUT having to install an add on ?? may have to goto another browser now!

    Firefox just updated and now my TABS are above the address bar... I do not wish to add another add on, it should be basic functionality to do this (as in previous versions) The vast population of users also want this according to the forums. How do I

  • Problem with total page numbers in Scripts

    Hi, I have a problem with total number of pages in the Script. I have a script of 15 pages. On every page, I am using &PAGE& of &SAPSCRIPT-FORMPAGES(C)&. Problem is : I am getting only single digit for SAPSCRIPT-FORMPAGES as long as the page number r

  • [SOLVED] Arch Linux on Macbook Pro 4.1

    Hey There, I'm a 2 years old Arch Linux guy and due to the problems I've had with my HP Pavilion PC, I've bought a Macbook Pro 3-4 months ago.. Because that it's a pain in the ass to install, upgrade and remove software on Mac OS X, especially develo

  • Fonts are choppy in illustrator CS5 :(

    I just installed this few minutes ago then this thing annoys me http://imgur.com/Zhg3m.png i am so irritated! it doesnt look like this in photoshop and dreamweaver! please tell me if i need to install something or restart I didnt check ALL of the pro

  • Async loading of test swf is never caught by listener

    Hi all, I'm really struggling getting a testing structure in place. I need to test a sub-swf which gets loaded into a range of main applications and its methods are then invoked. Therefore, I want to setup a test initially to load in that sub-swf (be