Problem inserting the euro sign using JDBC

Inserting the euro sign into a char field of a DB2 table using JDBC results in getting a control char (SUBSTITUTE / ASCII 26) in the field, instead of the expected euro sign.
I tried both the "old" DB2 driver (db2driver.zip) and the new one (db2jcc.jar). I get the same result in both cases. I also thought this might be a problem of different character sets between the client machine and the database server, but the problem doesn't occur if i use non java third party tools (like WinSQL) to insert the euro sign...
Any idea?
Colargol

Something like below will verify that you can send the character to the database, store it, and return it with java. You need to run this in a Unicode compliant tool, like Eclipse 3.0.
               //Euro character in Unicode is below, insert it into DB.
               int myCharacterInteger = 0x20AC;
               String myChar = new String(new char[]{(char) myCharacterInteger});
               System.out.println("My character inbound is " + myChar);
               pstmt.setString(1, myChar);
               pstmt.execute();
               pstmt.close();
               //Euro character in Unicode is below, insert it into DB.
               PreparedStatement pstmt2 = dbc
                         .prepareStatement("select * from tmp_junk");
               ResultSet rs = pstmt2.executeQuery();
               while (rs.next())
                    System.out
                              .println("My character from DB is " + rs.getString(1));If that returns the character properly from DB, examine how the character is being input into java, you may inadvertently be changing character sets there.
PS - that may not be right character, but you get the idea. We don't use Euros much where I work. ;-)
-Scott
http://www.swiftradius.com

Similar Messages

  • Adobe reader don't recognize the euro sign

    I installed adobe reader on 2 pc's with windows xp sp3.
    On one pc the euro sign in the pdf file is normal and on the
    other pc the euro sign will not be recognized.
    I did install adobe reader 9 on both pc's again, but
    still the same.
    What can be the cause???
    I hope to hear from somebody with the same problem
    and how to solve it.
    best regards

    Hi FEATISOUPOM,
    In order to help you better please let me know which operating system you are using name and version of operating system.
    Also let me know what is happening when you are trying to open the pdf document.
    You may try right click on the pdf document and choose option open with and browse for reader application if you are using windows.
    Regards,
    Ajlan.

  • How can i get the euro sign on my keyboard

    how can i activate the euro sign on my keyboard

    Have you tried pressing key combination Alt(Option) + 2 - it should give you this € (using a UK keyboard).

  • Problem with encoding euro sign in simple select

    select '€' from dual;
    should fulfill the requirements mentioned in
    http://www.oracle.com/technology/products/database/sql_developer/files/relnotes_v121.html#sec4
    But the Euro sign is displayed as a result only when connected to a DB with UTF8 encoding. When connected to a SBCS DB with encoding WE8MSWIN1252, ¬ is displayed instead. chr('€') displays 172, which is equal to the last byte of the UTF8 representation of the Euro sign \u20ac = e2 82 ac.
    The Euro sign is included in WE8MSWIN1252 with code 128, so I would expect the result of "select '€' from dual " to display correctly in both cases.
    I have just downloaded the current version Oracle SQL Developer 1.2.1, java version is 1.6.0_02-b06.

    This is what I am trying to establish. This forum is about Oracle SQL Developer, so the example was for SQL Developer. Yes, you do not need the feedback on command.
    My point is that for a number of my colleagues, all using the database encoding WE8MSWIN1252, we do not see the upside down question mark. In SQL Developer, we see the correct Euro symbol.
    I will continue to investigate this issue.
    I have tested this using NLS Settings for German, France, Ireland, United Kingdom and America, for my database with encoding WE8MSWIN1252. These all display the correct euro symbol and not an upside down question mark, whether I use the data tab in the table definition grid, or by running F9(run statement) or F5 (run script) in the SQL Worksheet in SQL Developer.
    You do not need to send me any configuration files. Just confirm that you are on the latest release , 1.2.1.32.13 and have not replaced any files once you installed this release. I will also work with our internationalization team to track down the issue. Currently the only difference is the Java version you are using.
    Sue

  • The euro sign in adobe reader is not correc t

    I have a
    a)PC with Windows XP Pro SP3 and Adobe Reader 9.1.2 netherlands
    b)PC with Windows XP Home SP3 and Adobe Reader 9.1.2 netherlands
    When I open a PDF file on computer b) the euro sign € shows correct
    but
    When I open the same PDF file on computer a) the euro sign € shows not correct
    Do somebody has an explanation for this??

    What exactly happens when you try?

  • How to update and insert the records without using Table_comparison and Map_operation?

    How to update and insert the records without using Table_comparison and Map_operation?

    Use either join or MERGE see this Inserting, Updating, and Deleting Data by Using MERGE

  • There was a problem inserting the Service Request: null

    I am trying out service desk. When I try to create a request I get:
    There was a problem inserting the Service Request: null
    I can't see what the issues is. All fields marked in red are filled.
    Tom

    Thomas,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Visit http://support.novell.com and search the knowledgebase and/or check all
    the other self support options and support programs available.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://forums.novell.com)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://forums.novell.com/faq.php
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://forums.novell.com/

  • Is anyone using iPhoto having a problem with the slide show using shatter where it does not let you put a title over photo?

    Is anyone using iPhoto having a problem with the slide show using shatter where it does not let you put a title over photo? It use to work but it no longer lets you place a title over the opening photo.

    Is your signature still current?(iPhoto '08, OS X Mountain Lion (10.8.4))    I can confirm this for iPhoto '11; Shatter will only show the text slide title between the slides. Ken Burns and Classic theme can still be set to overlay the caption and title directly over the slides.

  • Hi, I purchased an logitech ipad air keyboard from the apple store. Anybody know how I get the Euro sign € to appear I can't figure it out? Thanks

    Hi, I purchased a logitech ipad air keyboard cover i5 but I can't seem to find a way to bring up the € euro sign. Has anybody figured out how to do it? Thanks

    Hi, I figured it out, it's alt + 2, thanks forget about this query..

  • How to handle the BOLB column Using JDBC adapter

    Hi,
      I want to sending of a BOLB column from a DB2 database table to another DB2 database, and the sender and receiver both by using JDBC adapter. The two tables in each other database have the same columns.
      Here is the table's structure:
      <ID>string type</ID>
      <PDF>blob type</PDF>
      Also, i haved create two DataTypes in PI system.
      Sender DataType:
      ns:DT_PDF_Req xmlns:ns="http://XXXXX.com/sap/xi">
       <row>
         <ID>1</ID>
         <PDF></PDF>
       </row>
      </ns:DT_PDF_Req>
      Receiver DataType:
      <ns0:DT_PDF_Res xmlns:ns0="http://XXXX.com/sap/xi">
      <STMT>
      <dbtable action="INSERT">
      <table>tablename</table>
      <access>
       <ID></ID>
       <PDF></PDF>
      </access>
      </dbtable>
      </STMT>
      </ns0:DT_PDF_Res>
    When test this interface, i found the that we can get the data, but when execute the insert stms  the follow errors occured  in RWB :
    <ERROR>
    Could not execute statement for table/stored proc. "DBDPUSER.pdf" (structure "STMT") due to com.ibm.db2.jcc.b.nm: DB2 SQL Error: SQLCODE=-103, SQLSTATE=42604, SQLERRMC=255044462d312e330a25c7ec8fa20a352030206f626a0a3c3c2f4c656e677468203620, DRIVER=3.50.153
    JDBC Message processing failed, due to Error processing request in sax parser: Error when executing statement for table/stored proc. 'DBDPUSER.pdf' (structure 'STMT'): com.ibm.db2.jcc.b.nm: DB2 SQL Error: SQLCODE=-103, SQLSTATE=42604, SQLERRMC=255044462d312e330a25c7ec8fa20a352030206f626a0a3c3c2f4c656e677468203620, DRIVER=3.50.153
    </ERROR>
    Can anybody tell me how to resolve the problems?
    And tell me about how to deal BOLB column using PI.
    Best Regards
    Terry

    Hi Terry Qin,
    I understand, you are getting below XML from sender JDBC channel. But when you getting SAX parser error, in receiver JDBC.
    <ns:DT_PDF_Req xmlns:ns="http://XXXXX.com/sap/xi">
    <row>
    <ID>1</ID>
    <PDF></PDF>
    </row>
    </ns:DT_PDF_Req>
    I think it is because the XML which is going to receiver JDBC channel is not well formed (because pdf can containg < & characters).
    You can achive this sceanrio, by selecting receiver JDBC channel as Message Protocol "Native SQL Format" [Link1|http://help.sap.com/saphelp_nwpi711/helpdata/en/44/7c24a75cf83672e10000000a114a6b/frameset.htm] you can send non XML to receiver channel.
    Before that, you have convert above input XML into SQL statement, using Java Mapping.
    Regards,
    Raghu_Vamsee

  • Problem inserting in Infotype 0002 using FM HR_INFOTYPE_OPERATION

    Hello.
    Im having some trouble uploading data to the PA0002 infotype table. In my program , I upload all the information from a txt file. In this file, every line correponds to an entry of the table.
    To do this, I use the SPLIT sentence to insert in a pa0002 structure, all the values that come from the file line. After that, I use the HR_INFOTYPE_OPERATION to insert the data.
    This works for almost all the tests i made, except for one case: when I have to pass the P0002-ANZKD (number of children) field to the FM.
    The problem here is that when I call the function module the value seems to be correct. But when I make a debug  inside the FM, i noticed that this value is not displayed correctly when the FM makes the move operation to insert this value in the corresponding FVAL field for the PROPOSED_VALUES table. Also, all the values going after this field are not represented correctly in the PROPOSED_VALUES table.
    P0002-ANZKD is a DEC type field, so to make it work with SPLIT, i had to specify ANZKD as a type c field in my structure (everything else is as equal as P0002).  And I also tried uploading the data, first to my structure and later I make a MOVE-CORRESPONDING to an exact P0002 structure, but I get the same result in this case too .
    Does anybody now how can solve this issue?
    Thanks in advance,
    Juanma.

    Hi,
    I've managed to solve the problem. Changing the size of the anzkd field of my structure (greather than 3) and then passing all the values to a  p0002 stucture,  gave me the opportunity to upload succesfully the data into pa0002 with the FM.
    Thank you for your help Anil,
    Juanma.

  • Inserting oracle objects / collection using JDBC

    Hi people,
    I want to insert objects with collections(nested tables) into oracle database using my java JDBC. I believe there are two ways, one using strong types and the other as weak. I am using the weak types.
    This is what I have got so far:
    create or replace type town_ty as object(
    name varchar2(20)
    create or replace type country as object (
    name varchar2(20),
    towns town_ty
    create table country_tab of country_ty;
    Can any one kindly give or show me an example how to insert data into the above table using weak typed JDBC?
    Thanks very much

    Hi
    You should find what you are looking for in the samples provided here http://www.oracle.com/technology/sample_code/tech/java/sqlj_jdbc/files/advanced/advanced.html.
    HTH
    Chris

  • Problem with the EURO character

    I can't see the Euro character and I don't understand why. I use the symbol \u20AC and it doesn't work. I have use some fonts which allow the symbol but I only get a white space or nothing.
    I haven't tried to print it but I'll try. This problem happens trying to show in JLabels or JTextFields.
    Does anyone know what's wrong?
    I'm working with JDK 1.3.

    Hi Andres,
    I've seen this situation before with several characters that don't display in certain fonts even though font.canDisplay(char) evaluates true.
    For example, Courier New (among many others) and \u20ac . (I don't know why this is?)
    Anyway, use the Ariel Unicode MS font and it will display.
    Regards,
    Joe

  • Runbook to attach a Templated Incident to a specific Problem everytime the template is used

    I'm totally new to Runbooks and was wondering how difficult this would be?
    My goal is to use a runbook when we have a system outage, and my analysts dont have time between calls to attach each incident to the problem ticket. I want to do a runbook and attach this to the Incident Template in an Activity so it runs when the template
    is used or applied... is this the best way to do this? 
    BTW the Link Problem method doesnt work... not until you click OK on a new incident and then reopen it... so this is the main reason I wanna automate this....

    Yes we are using Service Manager, and we just got the addon pack for orchestrator to work with service manager.
    My intent, and what I do now, is I create a template for any item that looks like it may become a problem.... our environment we use 10 incidents to dictate creating a problem.
    On my Incident template once I add the problem, I put the PR# into the title of the Incident template....
    I was hoping a runbook would be easy to do that just took any incident with that title, and added it to a Problem.
    I am totally new and havent messed with them, but wasnt sure if this was something that would require "programming" or if the functionality is built into the runbook system to do something like this.

  • I have a problem with the speaker while using viber, Tango and rebtel

    I have upgraded my iPhone 4 to 5.1.1 and in no time I started having a problem with the speaker. It simply doesn't work at all with Viber, Tango  and Rebtel. It works fine with direct calls but not with calls through these applications. I have contacted Tango and Rebtel in this respect but non could help. Is anyone experiencing such problem. is there a solution. Many thanks for your helo

    Thank you. Have given it a try - it sort of works, although doesn't turn up very loud!

Maybe you are looking for

  • OfficeJet Pro L7700 Slow to print

    I have an HP OfficeJet Pro L7700 Series printer that is extremely slow at printing, and causing the print spooler service to pause or freeze for several minutes. - All the clients are running Windows 7 Professional 64-bit. - I have tested printing vi

  • How to Close Adobe Pdf Runtime

    Hi, I am using the Adobe PDF Runtime to Print the *10g Report* Directly to Printer. It's Is Working Fine. But After giving Print Option , The Adobe Runtime Still Running. Manually we need to Close that runtime window, then only the control come back

  • How to cancel Creative Cloud single-app membership for Photoshop (month-to-month)?

    Hello I've been trying to cancel my membership.  I've followed the steps to do this online however when I go to manage plan, there is nothing in there about my creative cloud membership (month to month) plan that I'm paying for.  Can I have some assi

  • On my Ipad2 I cannot go beyond Terms

    On my Ipad2 I cannot go beyond Terms & Conditions. After I click the T&C it takes me to several T&C by county , without any option to accept/decline. Can anyone help me to use my iTunes?

  • Ipod not under devices in itunes

    I pod disabled for 21 million minutes! I pod not showing up under devices in itunes