Not getting complete string back

hi,
i have a class which is suppose to return an address field from the database, but it seems to return only a portion of it, actually the string seems to only store a porition of it:
     public String getAddress1(String Id) {
          String address1 = "";
          try {
               Connection conn = DriverManager.getConnection("jdbc:odbc:db1");
               Statement s = conn.createStatement();
               String sql = "SELECT USER.ADDRESS_1_TXT FROM USER WHERE USER.USER_ID=" + Id + ";";
               ResultSet rs = s.executeQuery(sql);
               if(rs.next()) {
                    address1 = rs.getString("ADDRESS_1_TXT");
          }catch(SQLException e) {
               System.out.println("SQLException in UserBean - getAddress1 " + e.toString());
          return address1;
     }if the address was 123 w. abc street, the String address1 only shows 123, the rest is not there. but if i change the:
address1 = rs.getString("ADDRESS_1_TXT");
to
System.out.println(rs.getString("ADDRESS_1_TXT"));then it output all of it, so the query is ok, but the String can't store all for some reason, any ideas?
Thank you.

if the address was 123 w. abc street, the String
address1 only shows 123, the rest is not there. but
if i change the:
address1 = rs.getString("ADDRESS_1_TXT");
to
System.out.println(rs.getString("ADDRESS_1_TXT"));then it output all of it, so the query is ok, but the
String can't store all for some reason, any ideas?That's a good test. And it shows that the string returned from the database is correct. So you don't have a database problem, you have a problem with some part of your program that claims to display the string later.

Similar Messages

  • HT4623 Please help! I can not get my library back on my Itouch.  It says not connected to itunes on itouch

    I can not get my Library back on Itouch.  Itouch shows not connected to itunes on screen

    What do you mean by "Itouch shows not connected to itunes on screen"?

  • I deleted the playlists on my iPhone and when I now try to synchronize with my iTunes account to put the music back, nothing happens and I do not get the music back on my iPhone. Anyone who knows why that could be? Grateful for any suggestions!

    I deleted the playlists on my iPhone and when I now try to synchronize with my iTunes account to put the music back, nothing happens and I do not get the music back on my iPhone. Anyone who knows why that could be? Grateful for any suggestions!

    I know it sounds weird, and that is the reason I posted my question.  Because my case is not like all the ones I've found online and it's confusing.  I added a screen capture of my itunes with my old iphone (the one that houses my playlists) connected to it.
    My playlists "ARE"  in my iphone 4s.  They are still there even though they do not show up when I plug in to itunes in my computer. 
    When connecting my phone to itunes on my macbook, the playlists do not appear anywhere in itunes.  I have found my connected iphone icon, I have clicked on the arrow next to it and it does pull up the standard lists that come with the iphone/itunes:  Music, Movies, TV shows, books.  That's it! below that is "Genius" and below "Geniuns" is "PLAYLISTS"  but the only playlist of mine that shows there is one that I created several years back titled "90's music" and that one I created it on my computer, not my phone.  Under "90's music" there are also other standard playlists that itunes automatically adds.
    Does anyone else have this issue or know how to get around this.  I am starting to think that I am going to have to recreate these lists on my computer

  • I make annotations to my photos in iphoto using preview. But once I have made the annotation I do not get the photo back in iphoto into the event from which I took the photo. What am I doing wrong?

    I make annotations to my photos in iphoto using preview. But once I have made the annotation I do not get the photo back into the event in iphoto from which I took the photo. What am I doing wrong? I am not using aperture

    For the annotations to display on the photo in iPhoto you must setup Preview as the external editor in iPhoto via iPhoto's Advanced preference pane.
    After adding the annotations just do a Save.  iPhoto will then recognize the change via a new modified version.  You can revert to the original at any time if you want to get rid of the text.
    OT

  • Workflow Not getting Completed

    Dear All ,
    It is very urgent problem . I have one workflow based on FIPP . I have moved that from development to production . In development it is working very fine . BUt in production my last task is not getting completed .
    The scenario is the parked document will go through the approval process and last person will post the document . The document is getting posted But once the document is getting posted the table field WT_STAT of  table WITH_ITEM should get changed that is not happening in production . It is working very fine in development . What should be the reason . Please let me know if any thing has to be done .

    Hi,
    This looks more like a customizing for me! The table WITH_ITEM is associated with the Witholding tax of the line items in the Invoice document. I am not sure whether the customizing are the same in both the systems.
    On another hand are you using the standard workflow or a custom one? If you are using a custom one then I guess you can control this by having a terminating event "Posted" for this workitem.
    Hope this helps,
    Sudhi

  • Leave Workflow not getting Completed

    Hi,
    I have a custom leave workflow which is a copy of the standard one. I added two more levels for the workflow and that's the change that I made to this. Now the issue which I am facing is that even after the Final approver approves, the leave, the workflow is not getting completed . The workitem is getting completed and the data is saved in the infotype. What could be the reason for workflow still in Started status? Please do help.
    Regards,
    Jubish

    Hi AK,
    But, what is the terminating event for Leave? Could you please tell that? The thing is that, if the terminating event is not working fine, then the same issue will be there in for standard leave workflow also right?
    Regards,
    Jubish

  • RFC - XI - WebService :: Not getting complete Response from WS

    Hi
    I am working on a following Synchronous scenario
    <b>SAP R/3 --> Sender RFC Adapter --> XI --> Rec. SOAP Adapter --> MI Web Service</b>
    Now I tested the structure of Request/Response Message from WebService in XML Spy, & designed my Request/Response Message structure in XI based on that.
    Now when I am sending the request from <u>XML Spy</u>,the Response message which is coming is this -->
    <i><?xml version="1.0" encoding="UTF-8"?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <soapenv:Body>
              <ns1:getResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://www.MI/util">
                   <getReturn href="#id0"/>
              </ns1:getResponse>
              <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:AddressDTO" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://to.MIutil.com">               
                   <latitude href="#id1"/>               
                   <longitude href="#id2"/>               
                   <postcode xsi:type="soapenc:string">111</postcode>
                   <state xsi:type="soapenc:string">XYZ</state>
                   <streetName xsi:type="soapenc:string">NYDEL</streetName>
                   <streetNumber xsi:type="soapenc:string">444</streetNumber>
                   <streetType xsi:type="soapenc:string">ST</streetType>
                   <suburb xsi:type="soapenc:string">SQY</suburb>               
              </multiRef>
              <multiRef id="id1" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:double" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">-33.87571285585008</multiRef>
              <multiRef id="id2" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:double" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">51.20783220341076</multiRef>
         </soapenv:Body>
    </soapenv:Envelope></i>
    { <b>Pls. take note that it is referring variables</b>}
    But when I am sending the Request from SAP R/3 <u>using SAP XI</u>, I am getting the Response message from WebService like this -->
    <i><?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Call Adapter
      -->
    - <ns1:getResponse xmlns:ns1="http://www.MI/util" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <getReturn href="#id0" />
      </ns1:getResponse></i>
    which suggest that operation is getting called successfully & response is coming back.
    Can you tell me what is the reason that why I am not getting the rest of the response .
    Regards
    - Lalit Chaudhary -

    Hi,
    Yes it can be possible, you have to maintain SOAP Header.
    please see the below links..
    How to extract XI-header fields from XI-message in JAVA?
    /people/sap.user72/blog/2005/12/11/how-to-apply-themes-in-exchange-infrastructure
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c50cddbb-0601-0010-92a7-f2a40ca68e6d
    https://www.sdn.sap.com/irj/sdn/advancedsearch?query=href%20%20in%20xi&cat=sdn_all
    Regards
    Chilla..

  • Not getting right string format from textarea

    hello
    i am asking this question again sorry but i am facing another issue?
    actually i am not getting right text from textarea
    when i type in textarea in language other than english and run it prints text of text area it prints ? marks so i think its problem with textarea?
    my code is like below
    try {
                //  System.out.println(FacesContext.getCurrentInstance().getExternalContext().getResponseCharacterEncoding());
                  FacesContext.getCurrentInstance().getExternalContext().setResponseCharacterEncoding("UTF-8");
                  FacesContext.getCurrentInstance().getExternalContext().setRequestCharacterEncoding("UTF-8");
                  System.out.println(FacesContext.getCurrentInstance().getExternalContext().getResponseCharacterEncoding());
                String txt = (String) textArea1.getText();
                System.out.println(txt);
                            String suffix = ".txt";
                String prefix = "textfile";
                File ff = new File("d:/newsevents" );
                File tmpFile = File.createTempFile(prefix, suffix, ff);
                //tmpFile.
                Textfilename = tmpFile.getName();
                FileOutputStream fout = new FileOutputStream(tmpFile);
                if (textArea1.getText() != null) {
                    String s = (String) textArea1.getText();
                    fout.write(s.getBytes());
                fout.close();
            } catch (Exception ex) {
                System.out.println(ex);
            }any solution for that?

    Please read on about charset encodings carefully.
    This article is very helpful in this: [http://www.joelonsoftware.com/articles/Unicode.html].
    There are at least 2 points where your code fails:
    1) You used FileOutputStream rather than FileWriter to write characters into a text file.
    2) You assumed the characters being encoded in the platform's default charset and used [String#getBytes()|http://java.sun.com/javase/6/docs/api/java/lang/String.html#getBytes()] rather than specifying the right charset name or Charset.
    This specific problem has completely nothing to do with JSF.

  • Not getting a reply back from a BAPI call

    Hi all;
    I am trying to call a BAPI from xMII which has its input parameter as  from and to dates.I passed in the dates in format DDMMYYYY but am unable to get a reply back from BAPI.
    Same thing is working when i execute the BAPI with the same parameter in R/3 system.
    Please help.
    Mudit

    Mudit
    Did u hv defined Transaction Input parameter with Data Type DateTime which is used to be passed to BAPI request item.
    Pls do check the LastErrorMessage using Tracer (see the tracer logs after hitting F5/F6)
    IlluminatorDocument(With one string param defined)
    SAPJCOInterface(With BAPI call and input param passed in date format)
    <b>Tracer (LastErrorMessage mapped to the mesage) </b>
    IlluminatorRow(Reply from bapi mapped to output param)
    Assignment
    One thing more, y r u not using Repeater action which is used to loop the response from BAPI call and within the loop, use Row action to append the response item the XML Document defined in the first sequence. (Hope, u remember my that guided doc in some prvious thread posted to u where full guide with steps are provided)
    Regards
    Som

  • How get the string back?

    Hello with this code I put my string in a byte array.
    String code = "This is a testString";
    bytes[] ver = code.getBytes();
    Can someone tell me how I can get the original string back?

    I tried this
    String s = (ver);
    When I do this and try to compile I get the error that
    found byte[] required java.lang.string

  • New Server - Not Getting Event.Data back

    Its a weird problem i'm having. I've setup a brand new server (Original was a shared hosting setup from godaddy).
    I'm using my same application
    And i'm not getting event.data info back (in XML form)
    Here's an example:
    private function onUploadCompleteData(event:DataEvent):void {
    updateStatus(event.data, _numCurrentUpload - 1);
    var x:XML = new XML(event.data.toString()); <---- NOT FIRING
    Application.application.upAvatar = "/profile/" + x.name;
    Does anyone have any ideas? I was thinking it could be a misconfiguration with my apache settings.
    I'm using:
    Ubuntu
    Apache2
    PHP5
    CURL
    Thanks..

    hi,
    have you placed a fault event handler on your request to see what error if any is being returned ?
    David.

  • Iphone 4s sync not getting complete

    I'm using a Macbook air and Iphone  4S. From last few days I have observed that my 4s is not getting synced  in Itunes, It says syncing, completes stage one and at stage two syncing  mails, it stays there forever.
    iOS 6.1.3
    Mac Os X 10.8.4
    Itunes 11.0.5
    Please help???

    Hi Harish, Hi all,
    I seem to have similar issue syncin iPhone 4 (iOS6.1.3) with iTunes 11.0.5(5) on MacBook Intel 13" running Mac OS 10.7.5.
    Sync process starts, get slow and stuck at step 5, but then eventually terminates without any warning / error message, but contents (TV series, movies) are not updated.
    Any ideas / hints welcome, I couldn't find solution so far.
    Thanks. Martin

  • I can not get my phone backed up to the Cloud. Can someone please assist?

    I can not get my phone to back up to the cloud.  Can someone assit me with this?

    You’d need to supply more details about what’s not working for us to help…

  • Not getting subvi results back in main VI

    I've got a subvi that I using in another subvi that then gets used in the main VI.  The results from the first subvi transfer to the second subvi correctly but the results do not get transfered into the main VI.  I've wired the connecotr in the second subvi and the main VI the same way.  Can't labview transfer information like this?
    I've attached a few jpg's for clarity, or attempted clarity!

    Ah ha!
    The while loop ends in the first subvi by a time out, it finishes the array of tests then sends results to a spreadsheet.
    Attachments...(hopefully it works this time)
    Attachments:
    top_level.JPG ‏47 KB
    subvi.JPG ‏67 KB
    mid-level.JPG ‏25 KB

  • My iphone will not turn back to main screen it is frozen and can not get to go back

    my iphone will not get out of a locked function.  The phone at the bottom where you usually slide to unlock in changing in Japanese, and other symbols.  As well as I can not see anything or turn the phone on when unplugged.  after the screen has done the Japanese thing it acts like it needs to be plugged into computer to download itunes and states that it needs itunes to be restored.  Once I plug it into computer it only shows apple screen.  Any help?

    Try forcing a reboot on your iPhone. Hold down the Home button and Sleep button simultaneously for about ten seconds. Ignore anything the phone does and do not release until the screen goes dark and you see the Apple symbol. If your iPhone still wants to connect to iTunes, do so and see what happens. If there is still a problem, click Restore on your iPhone's summary page in iTunes. First restore from backup to try and preserve your content, but if this fails, you may have to restore your iPhone as new and manually set it up again. Good luck!
    Russell

Maybe you are looking for

  • Error in 3rd party dropship for international customer

    Hi All, Presntly we have a scenario in our rollout project for 3rd party drop ship. Sales organization/company code belongs to :- Japan Customer belongs to  :-  Indonesia Vendor belongs to  :-  Malasyia While saving the sales order with item category

  • Music/podcasts in the cloud

    How do I switch off the option to play what's in the cloud? I don't want the option and can't find a way to lose it.

  • Create dimension element in Essbase studio

    Hi, My source does not have version dimension and hence I have not included it in my schema. I want to create members for version dimension. I am trying to enter "Final" in caption binding. It is giving me errors. Is that the right way to create our

  • Help with Reports & Graphs

    Hi Can someone please tell me how to achive this in Reports 9i using Graphs Consider a table, CREATE TABLE test_std ( studentname VARCHAR2(10 BYTE), subject VARCHAR2(5 BYTE), marks NUMBER); My report need to show a graph in each page. Each page is fo

  • [SOLVED] dolphin-emu doesn't build

    I am trying to install dolphin-emu from AUR and when I do, it fails to build and I get the error message: CMake Error at CMakeLists.txt:235 (message): GLU is required but not found Note: It does find libGL.so I tried manually cloning the git repo and