Using JDBC to update nvarchar (foreiegn character data)

We have an application that updates tables in Oracle with foreign character data. The database character set is not UTF-16 but nvarchar columns are set to be nvarchar.
The application is working correctly in our development environment (using ORAOLEDB to connect to the server with the NDATATYPE value set to true). The development env is Eclipse/Tomcat 5.5/JRE 1.4
Our production environment is Weblogic using JDBC. In this environment we cannot correctly update our database with ???? written to the database.
What can we do to fix this issue?
Tks

Mark,
I believe Kuassi Mensah has an example of this in his book.
Sorry but I don't have my copy handy now.
Just search for his threads in the forum archives: Not just this one.
Try the JDBC forum and the Oracle database JVM forum.
Basically you can load the DB2 JDBC driver into Oracle database and then use a java stored procedure to get the data.
Good Luck,
Avi.

Similar Messages

  • More log writer contention when using JDBC Batch Updates?

    So if I'm already seeing log writer contention when I'm commiting inserts one row at a time.
    Why would I see even more contention of log writer ie. commit waits in Enterprise Manager when I batch these inserts using JDBC updates.
    Today I observed significantly more commit waits when I used JDBC batching vs commit one row at a time.

    Please refer
    http://www.oracle.com/technology/products/oracle9i/daily/jun07.html

  • Using DTW to update the Item Master Data attachment tab

    Hi Experts,
    Has anyone tried using DTW to update the Attachments Tab on the Item Master Data please?  I tried a few things (similar to importing an attachment to an activity) and couldn't get it to work.
    I couldn't see that anything to do with the Attachments Tab was exposed in DTW when looking at the mapping fields and also when looking through the options available in the Items Object under Customize Templates - but then I might not be seeing it correctly!
    Any ideas or solutions would be great.
    Many thanks,
    Caroline

    Hi Caroline,
    AtcEntry is correct for the document, this relates to the AbsEntry in OATC, which then in turn links to AbsEntry in ATC1.
    There are a few fields that need to be populated in ATC1:
    AbsEntry
    Line - To be used if more than 1 Attachment
    SrcPath - for the file path
    Filename - for the file name
    FileExt - for file type - i.e. .pdf
    You may be able to configure DTW to import these as a manually created DTW but I suspect that OATC and ATC1 are not open to the Di which will stop it. Coincidently I have been looking at Task Centre to update these but have encountered the same problem
    Regards
    Sean Martin

  • Using cfloop to update and/or add data?

    I am using this code from a tutorial on the web to add multiple records to a database. These records are linked to another table by ProductID, in other words there could be many records generated by this form but they will all have the same ProductID number coinciding with the one ProductID in the other table. Here is my issue, I need an update page for these records that will allow me to update existing records or add additional ones. I am new to using cfloop and was able to get the original code to function correctly but can't figure out how to code this for update. Any help would be appreciated.
    Here is the code:
    <cfif isdefined ("form.number")>
        <cfset getnumber = form.number + 1>
    <cfelse>
        <cfset getnumber = 1>
    </cfif>
    <cfif getnumber GT 1>
        <cfset focusonme = " document.all.osform.CFSNumber" & getnumber & ".focus();">
    <cfelse>
        <cfset focusonme = "document.all.osform.CFSNumber.focus();">
    </cfif>
    <cfoutput>
    <script type="text/javascript">
            function dofocusthing(){
                            #focusonme#      
            function submitform(){
                            document.all.osform.action = 'act_add.cfm';
                            document.all.osform.submit();
            function getnewline(){
                            document.all.osform.action = 'add_products.cfm';
                            document.all.osform.submit();
        </script>
    </cfoutput>
    <body onLoad="javascript:dofocusthing();">
    <table width="80%" rules="none" align="center">
        <tr>
            <td>CFSNumber</td>
            <td>MfgPart</td>
            <td>Pack</td>
            <td>Pallet-Case</td>
            <td>Size</td>
        </tr>
        <cfoutput>
            <input type="hidden" name="number" value="#getnumber#">
            <cfloop from="1" to="#getnumber#" index="idx">
                <tr>
                    <cfif isdefined ("form.CFSNumber#idx#")>
                        <td><input type="text" name="CFSNumber#idx#" value="#evaluate("form.CFSNumber#idx#")#"></td>
                    <cfelse>
                        <td><cfinput type="text" name="CFSNumber#idx#"></td>
                    </cfif>
                    <cfif isdefined ("form.MfgPart#idx#")>
                        <td><cfinput type="text" name="MfgPart#idx#" value="#evaluate("form.MfgPart#idx#")#"></td>
                    <cfelse>
                        <td><cfinput type="text" name="MfgPart#idx#"></TD>
                    </cfif>
                    <cfif isdefined ("form.Pack#idx#")>
                        <td><cfinput type="text" name="Pack#idx#" value="#evaluate("form.Pack#idx#")#"></td>
                    <cfelse>
                        <td><cfinput type="text" name="Pack#idx#"></td>
                    </cfif>
                    <cfif isdefined ("form.PalletCase#idx#")>
                        <td><cfinput type="text" name="PalletCase#idx#" value="#evaluate("form.PalletCase#idx#")#"></td>
                    <cfelse>
                        <td><cfinput type="text" name="PalletCase#idx#"></td>
                    </cfif>
                    <cfif isdefined ("form.Size#idx#")>
                        <td><cfinput type="text" name="Size#idx#" value="#evaluate("form.Size#idx#")#"></td>
                    <cfelse>
                        <td><cfinput type="text" name="Size#idx#"></td>
                    </cfif>
                </tr>
            </cfloop>
        </cfoutput>
        <tr>
            <td colspan="8"><input type="button" name="add" value="Add Line onClick="javascript:getnewline();"></td>
        </tr>
    </table>
    <table width="90%" align="center">
        <tr>
            <td> </td>
        </tr>
    </table>
    And the action page:
    <cfloop from="1" to="#form.number#" index="idx">
        <cfset getCFSNumber = evaluate("form.CFSNumber" & idx)>
        <cfset getMfgPart = evaluate("form.MfgPart" & idx)>
        <cfset getPack = evaluate("form.Pack" & idx)>
        <cfset getPalletCase = evaluate("form.PalletCase" & idx)>
        <cfset getSize = evaluate("form.Size" & idx)>
        <cfquery name="addSubProducts" datasource="farmky">
            insert into SubProduct (CFSNumber,MfgPart,Pack,PalletCase,Size)
            values (#getCFSNumber#,'#getMfgPart#','#getPack#','#getPalletCase#','#getSize#')
        </cfquery>
    </cfloop>

    emartek1 wrote:
    How do I 'pass' the primary key? When I updated the code like shown below I am still getting the error message. My cfdump clause shows the ProductID field as 30,30,30. When I execute the template I still get the error message listed above but if I refresh it it will run through the whole gambit of all the fields ending in _#. How can I make this work?
    <cfset ProductID = FORM["ProductID">
    <cfparam name="form.numberOfFields" default="0">
    <cfloop from="1" to="#form.numberOfFields#" index="counter">
    <cfset CFSNumber = FORM["CFSNumber_"& counter]>
    <cfset MfgPart = FORM["MfgPart_"& counter]>
    <cfset Pack = FORM["Pack_"& counter]>
    <cfset PalletCase = FORM["PalletCase_"& counter]>
    <cfset Size = FORM["Size_"& counter]>
    <cfquery name="updSubProducts" datasource="farmky">
            update SubProduct (ProductID,CFSNumber,MfgPart,Pack,PalletCase,Size)
            set ('#ProductID#','#CFSNumber#','#MfgPart#','#Pack#','#PalletCase#','#Si ze#')
        </cfquery>
    </cfloop>
    In a previous post, you called the database table Products. Now, you call it SubProduct. This is confusing.
    I will assume the table is SubProduct, and that its primary key is ProductID. The primary key comes in via the URL (see your second post). You could then forward it to the action page by means of a hidden form field. Hence add the following tag to the form page:
    <input type="hidden" name="ProductID" value="#URL.ProductID#">
    Now to the action page. You have used single quotes for all the update values, which leads me to a question. Are all the datatypes varchars? If not, remove the quotes for columns that are of numeric type.
    <cfloop from="1" to="#form['numberOfFields']#" index="counter">
    <cfset CFSNumber = FORM["CFSNumber_"& counter]>
    <cfset MfgPart = FORM["MfgPart_"& counter]>
    <cfset Pack = FORM["Pack_"& counter]>
    <cfset PalletCase = FORM["PalletCase_"& counter]>
    <cfset Size = FORM["Size_"& counter]>
    <cfquery name="updSubProducts" datasource="farmky">
        UPDATE SubProduct (CFSNumber,MfgPart,Pack,PalletCase,Size)
        SET ('#CFSNumber#','#MfgPart#','#Pack#','#PalletCase#','#Size#')
        WHERE productID = <cfqueryparam  value="#FORM['ProductID']#" cfsqltype="CF_SQL_VARCHAR">
    </cfquery>
    </cfloop>

  • Can we use JDBC adapter at ECC side to extract the data directly

    Hi ,
    Is it possible in any way we can use JDBC adapter at SAP to extract data from sap tables.because as far as i know jdbc adapter used only when we having some database system at sender side.
    Regards

    Hi,
    SAP R3 is installed over a DB (Oracle, DB2 etc) this DB as a persistent storage for storing data and other information. R3 rovides a layer over the underlying database so that no one can directly access or modify the contents (due to security and data integrity issues). Hence it exposes its own RFC's for data access and modifications...
    But like I said before SAP recommends to make use of RFC's or BAPI's to access data stored in R3 tables; but we can also access them directly.You need to take the help of a DB admin for this
    Regards
    Suraj

  • JDBC Batch Updates & PreparedStatement problems (Oracle 8i)

    Hi,
    we're running into problems when trying to use JDBC Batch Updates with PreparedStatement in Oracle8i.
    First of all, Oracle throws a SQLException if one of the statements in the batch fails (e.g. because of a unique constraint violation). As far as I understand, a BatchUpdateException should be thrown?
    The next problem is much worse:
    Consider this table:
    SQL> desc oktest
    ID NOT NULL NUMBER(10)
    VALUE NOT NULL VARCHAR2(20)
    primary key is ID
    When inserting in through batch updates with a PreparedStatement, I can pass 'blah' as a value for ID without getting an exception (Oracle silently converts 'blah' to zero). Only when the offending statement is the last statement in the batch, Oracle throws an exception (again, SQLException instead of BatchUpdateException).
    Any comments/suggestions are appreciated.
    E-mail me if you want to see the code...
    Thanks,
    Oliver
    Oracle version info:
    (Enterprise Edition Release 8.1.6.0.0, JServer Release 8.1.6.0.0, Oracle JDBC driver 8.1.6.0.0 and 8.1.7.0.0 (we're using the 'thin' driver)
    CLASSPATH=/opt/oracle/product/8.1.7/jdbc/lib/classes12.zip:...
    null

    Please refer
    http://www.oracle.com/technology/products/oracle9i/daily/jun07.html

  • How to update two tables in a single call using JDBC Sender adapter

    Hello All,
    The scenario is, database entries have to be selected from two tables and at the same time those tables have to be udpated with the flag.
    We are using JDBC sender adapter and in Select Query, we are fetching the data by joinin the two tables.
    Update Statemtent: We can only update one table using this statement.
    Is it possible to update two tables using the Update Statement without using Stored Procedures.
    Let me know.
    Regards,
    Sreenivas.

    Hi Sreenivas,
    > Is it possible to update two tables using the Update Statement without using Stored Procedures.
    Yes its possible through join statement
    Check this links
    Update in JDBC Sender adapter for more than one table
    data from 2 tables for jdbc sender adapter
    Regards
    Ramesh

  • Error while updating database using jdbc receiver adapter

    Hi All,
    I am trying to update a single record using jdbc receiver adapter.
    This is my the message that is getting created..
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:Data xmlns:ns0="urn:Test">
    - <STATEMENT>
    - <TABLENAME ACTION="UPDATE_INSERT">
      <TABLE>ORDERS</TABLE>
    - <ACCESS>
      <OrderID>99999</OrderID>
      <CustomerID>VICTE</CustomerID>
      <EmployeeID>3</EmployeeID>
      <ShipAddress>VICTE</ShipAddress>
      </ACCESS>
    - <KEY>
      <OrderID compareOperation="EQ">99999</OrderID>
      <ShipAddress compareOperation="EQ">VICTE</ShipAddress>
      </KEY>
      </TABLENAME>
      </STATEMENT>
      </ns0:Data>
    But in Adapter Monitoring i am getting the following error..
    <i>Error while parsing or executing XML-SQL document: Error processing request in sax parser: Error when executing statement for table/stored proc. 'ORDERS' (structure 'STATEMENT'): java.sql.SQLException: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near 'VICTE'.</i>
    Regards,
    Rahul

    Rahul,
    > In this case i believe the interface has to be synch.
    > So what will the response message type be like..
    Not necessary. UPDATE can be asynch as well.
    Can you turn the trace on like pointed by Michal and then you can see the Query in the Audit Log of the adapter montioring. Try to execute the same query from your DB Client like TOAD and see what is the Syntax error you are getiing.!
    The problem looks like some field has some dataype / column name mismatch.
    Regards
    Bhavesh

  • 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...

  • Update Schedule line Delivery date using Bapi_po_Change

    Hi all,
    I am using Bapi_po_change to Update the Schedule line Delivery date(EKET-EINDT) for the PO based on the Item and the Schedule line.
    I am passing the PO number, Po header, Item structure, Schedule line Structure.
    But the Date is not getting updated in the Eket table.
    Please suggest.

    Hi Sukriti,
    Thanks for the Response, yes i have used the Bapi Transaction Commit Also .
    The point is I am able to Update the Statistical Delivery Date in the Same EKET table using BAPI_PO_Change .I have Checked all the Ways to update the EKET-EINDT(Delivery Date)but no Unable to do it.

  • Use JDBC to query data for JSP Report

    Hi all,
    I met a trouble when use JDBC to query data,
    it can show data in report builder, but get error when call from url for exxample: http://localhost:8889/reports/TestJDBCReport.jsp
    found error message:
    javax.servlet.jsp.JspException: rwlib-1: REP-4100: Failed to execute data source. REP-0069: Internal error JDBCPDS-62000:Invalid sign-on parameter P_JDBCPDS
    javax.servlet.jsp.JspException: rwlib-1: REP-4100: Failed to execute data source.
    REP-0069: Internal error
    JDBCPDS-62000:Invalid sign-on parameter P_JDBCPDS
    anyone know pls help me
    Many thanks

    As a general rule, it's a good idea to separate the
    presentation (JSP and HTML) from the business rules
    (database access). I know you didn't do that on the
    AS/400, you had display files and business logic in
    the same program (at least, we certainly do in ours),
    but it's a good policy to follow in the web world.
    That means, don't put your database access code in
    the JSP. Other than that, it depends on the data.
    If you have simple data (e.g. customer's name and
    d address) then a Java bean would suffice. If you
    have complex data (e.g. customer's payment history)
    then a bean still might suffice. You would use an
    "include" if you had some data (static or dynamic)
    that you wanted to appear in several different pages
    in the same form.Thanks, I figured putting the code in the JSP was not the best way, but I wasn't sure about the other options.

  • Error while retrieving data from sql using jdbc adapter

    hi all,
    i m working on one scenario where i m sending data using HTTP and receiver is jdbc adapter which is retrieving me data from sql server.
    i have checked the structure both for req and res.
    i m getting this error
    <SAP:Error>
    <SAP:Category>Application</SAP:Category>
    <SAP:Code>MAPPING.EXCEPTION_DURING_EXECUTE</SAP:Code>
    <SAP:P1>com/sap/xi/tf/_INF57285_DB_HR_RES_</SAP:P1>
    <SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>
    <SAP:P3>RuntimeException in Message-Mapping transformatio~</SAP:P3>
    <SAP:Stack>During the application mapping com/sap/xi/tf/_INF57285_DB_HR_RES_ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: RuntimeException in Message-Mapping transformatio~</SAP:Stack>
    </SAP:Error>
    can somebody help me with this.
    Thanks & Regards
    Aruna

    thnks bhavesh i think i made it that way
    JDBC REQ  
      <ns:INF57285_DB_Request xmlns:ns="http://www.infosys.com/xi/training/hyd/57285">
      <Employee>
        <EmpDetails action="SELECT">
          <table>EmpDetails</table>
          <access>
            <Name />
            <EmpId />
            <Band />
            <Salary />
          </access>
          <Key>
            <EmpId>57285</EmpId>
          </Key>
        </EmpDetails>
      </Employee>
    </ns:INF57285_DB_Request>                        
      JDBC RES
    <ns:INF57285_DB_Request_response xmlns:ns="http://www.infosys.com/xi/training/hyd/57285">
      <Employee_response>
        <row>
          <Name>aruna</Name>
          <EmpId>57285</EmpId>
          <Band>A</Band>
          <Salary>4675776</Salary>
        </row>
      </Employee_response>
    </ns:INF57285_DB_Request_response>
    my hr req is which i mapped with DB req
    <ns:INF57285_HR_Req xmlns:ns="http://www.infosys.com/xi/training/hyd/57285">
      <REQUEST>
        <EmpNo>57285</EmpNo>
      </REQUEST>
    </ns:INF57285_HR_Req>
    my hr res is which i mapped with DB res
    <ns:INF57285_HR_Res xmlns:ns="http://www.infosys.com/xi/training/hyd/57285">
      <response>
        <row>
          <Name>aruna</Name>
          <Empld>57285</Empld>
          <Salary>4675776</Salary>
        </row>
      </response>
    </ns:INF57285_HR_Res>
    and interestingly i am not getting any error in sxmb_moni
    it's not showing any error
    plz suggest me something wht to do ....
    thnks & regards
    Aruna

  • Updating target table with date in owb using mapping

    I want to update the effetive begin date (month begin date) when we load the target table. I have field in target table has Eff_updated_dt defined as DATE.
    If I use the Data generator operator and then expression operator (trunc (sysdate,'mm' ) it giving error. It says data generator operator should be connected to flat file .
    What other operators can I use to update the column with month begin data.
    Also which operator I have use to have sequence key in the table.
    Thanks

    you can always use a constant for the date field.
    just create a constant of type date and give it the value you want, trunc (sysdate,'mm' ) and connect it to your target column, Eff_updated_dt defined.
    you have a sequence operator that you can use to link to your "sequence key" as well.
    Borkur

  • Passing XMLType Data into oracle stored procedure using JDBC

    Hi Friends,
    I have requirement where my oracle stored procedure accepts XML file as an input. This XML File is generated in runtime using java, I need to pass that xml file using JDBC to oracle stored procedure. Please let me know the fesibile solution for this problem.
    Following are the environment details
    JDK Version: 1.6
    Oracle: 10g
    Server: Tomcat 6.x
    Thanks in Advance

    user4898687 wrote:
    I have requirement where my oracle stored procedure accepts XML file as an input. This XML File is generated in runtime using java, I need to pass that xml file using JDBC to oracle stored procedure. Please let me know the fesibile solution for this problem.As stated - no.
    A 'file' is a file system entity. There is no way to pass a 'file' anywhere. Not PL/SQL. Not java.
    Now you can pass a file path (a string) in java and to PL/SQL.
    Or you can pass xml data (a string) in java and to PL/SQL. For PL/SQL you could use eithe a varchar2, if the xml is rather small, or a blob/clob.

  • I just updated my iphone4 to iOS5.1 and now I cant use my 3g, everything on my cellular data's right but I cant activate my 3g anymore, can you help me please? thank you! i really need it

    I just updated my iphone4 to iOS5.1 and now I cant use my 3g, everything on my cellular data's right but I cant activate my 3g anymore, can you help me please? thank you! i really need it

    Did you try to reset the phone by holding the sleep and home button for about 10sec, until the Apple logo comes back again? You will not lose data doing a reset.
    If this does not work, set it up again as new device, without using the latest backup afterwards.
    How to back up your data and set up as a new device

Maybe you are looking for