Strange problem retreiving string from database

Hi,
I am receiving a very strange problem retreiving a string from a database. The database I am using is Access. I am using .getString(COLUMN_NAME) to get the data from the particular record in the result set. The problem is that sometimes it does not seem to get the entire information that is in the cell. I have found that it is completely random on when it will get the entire contents and when it will only get a portion. It seems like once it gets only a portion though, that every other retrieval of the same field on a different record in the result set will yield the same cut-off point. Of course to make my life even more difficult, it is not always the same cut-off point on a different result set.
Has anyone else experienced anything along these lines? Any help would be greatly appreciated as I am running out of ideas as to the cause.
Thank you

I've printed out exactly what is being retrieved from the fields in question and that's how I narrowed it down to that it has to do with the retrieval of the information from the result set. I've found the exact line of code where I am suddenly receiving only part of the data. And all I'm doing there is just getting the data from the result set. Nothing fancy at all. So unless the result set is becomming corrupt somehow...not sure how that would happen though by just cycling through?

Similar Messages

  • How to retreive String from the Connection object

    hi all,
    I am using HttpConnection to Connect to the server.I want to retreive string from the Connection.
    As like Connection.openInputStream() is there any method to get the String from the connection.In the server side also i want to send the String not the stream .
    Thanks in advance
    lakshman

    Just read the string from the stream.

  • Retrieving Strings from Database query ??

    Hi,
    The problem i'm having at the moment is, with the following code:
    connect = DriverManager.getConnection("jdbc:mysql://ash.bc.ic.ac.uk/KEGG_devel?user=null&password=guest");
    Statement stmnt1 = connect.createStatement();
    ResultSet rs1 = stmnt1.executeQuery("SELECT DISTINCT A.ReactID, A.ECid FROM ECReact As A INNER JOIN ECReact As B ON A.ECid = B.ECid AND A.id <> B.id ");
    System.out.println("the size of rs1 is: " +rs1.getFetchSize());
    while (rs1.next()){
    String reactionId = rs1.getString("ReactID");
    String ecNumb = rs1.getString("ECid");
    System.out.println("the value of ecNumb is :" +ecNumb);
    I want to be able to retrieve a String from the query called ECid - an example of such a String would be 4.2.1.86 or 4.2.1.44. However, when i'm Storing the "ECid" in a String called ecNumb and then printing the String all that i get returned is the last 2 digits !
    Does anyone know how to resolve this ??
    Thanks very much for any help
    (oh yeah + for future reference, how do i highlight code in topics??)

    to highlight code... isSimple...
    [bold] [ code][bold]
    your code pasted in here
    [bold] [ / code][bold]
    but leave out the spaces in the []
    i had to add them to get [ c o d e ] to show up.
    m.

  • Problem with IMPORT FROM DATABASE

    Hello Members,
          I have a program which reads content of INDX table (cluster table) using
    IMPORT tab = lt_ccris1 FROM DATABASE indx(xa) TO wa_indx CLIENT
    sy-mandt ID 'DETAILLIST'.
    sy-subrc return is 0.
    But internal table lt_ccris1 is not populated. I expect entries to be populated here as there is an raw data entry in the INDX - CLUSTD field of database.
    1)   Also I am intereseted to knoe where is the data exported to this INDX table? Usual searches does not show any export statement.
    2)   Is there a FM which can directly read content of INDX table?
            Your help is much appreciated.

    Hi Thomas,
        Thanks for the reply.
    //How do you know your IMPORT syntax must look exactly like this? //
    I did not write this custom report and IMPORT statement is exactly the same as I have given. It is correct as per syntax.
    In SE16 INDX does contain an entry for the given key.
    I searched for EXPORT stmt in varall ways including debugging (Please note there is a SUBMIT <program> before IMPORT and if at all there is an export it should be in there). Could not find from debugging as well.
    RS_ABAP_SOURCE_SCAN does not exist in my 4.7.
    Regards
    Ram

  • Strange problem with unflatten from string

    Hi all,
    Attached are the VIs that make me crazy.
    The problem is simple, Creat fake signal creats datas and uses a strict type def control (cluster) then this cluster is flatten to a string and written into a text file.
    Test read opens one of that file and unflatten the datas with the same stric type def. There is the problem it does not work!
    If I wire a cst arry into the data terminal of the bundle by name, then there is no problem. By if I wire other array it does not work always... It seems random.....
    I hope that somebody can help me. Even people reproducing the error are welcome, to know if it comes from my computer.
    Thanks a lot for the help
    Attachments:
    vis.zip ‏43 KB

    I changed the write to binary sting file with write to binary file and it seemed to fix the problem. I had to change it in your gen fake data file too.
    Tim
    Johnson Controls
    Holland Michigan
    Attachments:
    vis.zip ‏44 KB

  • Communication Channel Problem while reading from database

    Hi,
    I have a JDBC to IDoc scenario.
    The database here is AS400 and i need to read data from AS400 tables and send it to SAP IDocs.
    The communication channel picks up the data from AS400 based on the query and builds the IDocs.
    Suddenly the channel stops working and it doesnt pick up the data from AS400. When we change the name of the Communication Channel, it again starts picking up the data but again for some period.
    It sounds really strange as this is happening only with AS400 database and not it works perfectly when connecting to an SQL Server database.
    Please help me out in resolving this issue.
    Regards
    Kiran.

    Hi Kiran
    Can you check the Notes 717376 ,990892 and try to implement.
    Some tips:
    This error is caused by some optimization in the IBM VM for AS400 which can be disabled through the JIT compiler settings. The following VM setting -Dos400.run.mode=jitc must be set, according to note 717376. Any other value for this setting, as e.g. jitc_de can cause the described problem
    Also, please share the trace, so that, it would help to identify the problem.
    Also try to change the property in Vis Admin
    "cluster-data" -> "Global server configuration" -> "managers" -> "ApplicationThreadManager" -> "MaxThreadCount" ( like 400)
    Regards
    Chilla

  • Having problem querying data from database

    I'm trying to setup a query form to see if the username and password entered is already in a database. If it is then a Static Text will give a positive message, if not then the user would be asked to register. My query doesn't seem to work, since every time I run it the Static Text doesn't show anything after I hit my submit button. Any help would be great.
    public String loginButton_action() {
    // TODO: Process the action. Return value is a navigation
    // case name where null will return to the same page.
    String currentuser = (String) regusernameTF.getValue();
    String currentpass = (String) regpasswordTF.getValue();
    try {
    connection = DriverManager.getConnection(Database_URL);
    statement = connection.createStatement();
    ResultSet resultset = statement.executeQuery(
    "SELECT Username ,Password FROM CustomerInfo" +
    "WHERE (Username =' " currentuser " ') ");
    connection.commit();
    statement.close();
    connection.close();
    String loggeduser = resultset.getString(1);
    String loggedpass = resultset.getString(2);
    boolean compare1 = loggeduser.equals(currentuser);
    boolean compare2 = loggedpass.equals(currentpass);
    if ((compare1==true) || (compare2==true)){
    messageST.setRendered(true);
    messageST.setText("Login Successful");
    else {
    messageST.setRendered(true);
    messageST.setText("Username & Password not Valid." +
    "Please Check Entry or Register to Login");
    catch (Exception e){
    e.printStackTrace();
    return null;
    Edited by: mavrik5150 on Feb 9, 2008 4:49 PM
    Edit: Forgot to mention the Database does have data already populated into it

    Hey Thanks guys for the tips, I was able to fix one problem, now I can get the Static Text field to display a message but I can't get the error message to appear when I purposly enter a wrong password or username. If I enter a correct username I get a successful message, even when I enter the wrong password. Here's the fixed code:
        public String loginButton_action() {
            // TODO: Process the action. Return value is a navigation
            // case name where null will return to the same page.
            Object currentuser =  regusernameTF.getValue();
            Object currentpass =  regpasswordTF.getValue();
            try {
            connection = DriverManager.getConnection(Database_URL);
            statement = connection.createStatement();       
            ResultSet resultset = statement.executeQuery(
                    "SELECT Username ,Password FROM CustomerInfo WHERE (Username ='"+currentuser+"') ");       
    //        connection.commit();
    //        statement.close();
    //        connection.close();   
            while (resultset.next()){
            String loggeduser = resultset.getString("username");
            String loggedpass = resultset.getString("password");
            boolean compare1 = loggeduser.equals(currentuser);
            boolean compare2 = loggedpass.equals(currentpass);
            if (compare1 || compare2){
                messageST.setRendered(true);
                messageST.setText("Login Successful");
            else {
                messageST.setRendered(true);
                messageST.setText("Username & Password not Valid." +
                        "Please Check Entry or Register to Login");
            catch (Exception e){
                e.printStackTrace();
            return null;
        }

  • Reading large large string from database

    I am reading is a large string value. It's data type in Oracle is CLOB. I was originally casting it to vARCHAR2(4000) in the select statement, but just realized the data can be larger than 4000. I took out the cast and have tried changing to several data types, but they all error out. How can I read in string data greater than 4000 characters?

    You must use Java to do this, the Execute Script operation makes it simple. I have put together a little process to demonstrate, and I can paste the Java from the Execute Script step below.
    It's all in the data-typing. In the sample I built, the BigString and NewBigString process variables are of LiveCycle type "string" with unlimited size. These become CLOBs in the database. When read as a CLOB object using JDBC, converted to Java Strings, they then can be loaded into the LiveCycle Process data and the API handles the rest.
    Let me know if I'm not clear enough with my explanation.
    Jeff A Yates
    http://www.avoka.com
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.Statement;
    import java.sql.ResultSet;
    import javax.sql.DataSource;
    import javax.naming.InitialContext;
    int processId = patExecContext.getProcessDataIntValue("/process_data/@id");
    InitialContext context = new InitialContext();
    Connection connection = ((DataSource)context.lookup("java:/IDP_DS")).getConnection();
    String queryQuery = "select bigdocument, bigstring from tb_pt_workwithxlobs where process_instance_id = ?";
    PreparedStatement queryStatement = connection.prepareStatement(queryQuery);
    try {
    queryStatement.setInt(1, processId);
    ResultSet results = queryStatement.executeQuery();
    results.next();
    java.sql.Blob documentBlob = results.getBlob(1);
    com.adobe.idp.Document document = new com.adobe.idp.Document(documentBlob.getBinaryStream());
    patExecContext.setProcessDataValue("/process_data/@NewBigDocument", document);
    java.sql.Clob stringClob = results.getClob(2);
    patExecContext.setProcessDataValue("/process_data/@NewBigString", stringClob.getSubString(1L, (int)stringClob.length()));
    } catch(Exception ex) {
    ex.printStackTrace();
    queryStatement.close();
    connection.close();

  • Strange problem with an Oracle database link to SQL Server

    Hi gurus,
    Please help me on this problem.
    We have an Oracle 10R2 database link to a SQL Server 2000 database. I can select count(*) from The_SQL_Server_Table@myOracleLink, and I can describe The_SQL_Server_Table@myOracleLink, but I cannot select Column1 from The_SQL_Server_Table@myOracleLink! I am getting the ORA-00904: "COLUMN1": invalid identifier error.
    Could anyone tell me what is wrong here? By the way, the same user name can select all the columns in The_SQL_Server_Table through ODBC from the client app. But I need the DB link to work with some Oracle stored functions.
    Thank you!
    Ben

    myora9i wrote:
    Hi gurus,
    Please help me on this problem.
    We have an Oracle 10R2 database link to a SQL Server 2000 database. I can select count(*) from The_SQL_Server_Table@myOracleLink, and I can describe The_SQL_Server_Table@myOracleLink, but I cannot select Column1 from The_SQL_Server_Table@myOracleLink! I am getting the ORA-00904: "COLUMN1": invalid identifier error.
    Could anyone tell me what is wrong here? By the way, the same user name can select all the columns in The_SQL_Server_Table through ODBC from the client app. But I need the DB link to work with some Oracle stored functions.
    Thank you!
    Bennotice "COLUMN1" is different from "Column1"
    CaSe MaTTerS!

  • Strange problem with automattic start database on linux

    HI,
    We have Redhat Version 4.(update )
    or
    Oracle Version 10.1.0.2.0
    we followed instruction mention in documentation. ( 10gr2) for automatic startup database when linux system reboot.
    after create above script and followed all mention point when we reboot our linux machine it is hang.
    Problem>>>
    when we reboot our linux system. it HANG !!!! nothing happen..
    On enabling swap space            [ok]
    | cursor blinksir please tell me How can open my linux machine... please anybody give me any type of advice..
    thank you very much.
    nomini.

    Hi,
    thank your for your help and reply
    but i am not able to open my linux machine so how can i update my oracle startup script.
    it is hang during booting time ( linux server)
    actually what happen.
    i made script and just for test i reboot my linux machine.
    every thing goes fine but "oracle startup script" run it will hang !!!
    i know it is something wrong with my oracle startup script.
    but without open my linux box i cann't do anything.
    so
    i have to first FIX linux problem
    then i FIX my oracle script problem
    hope you reply and understand my problem
    thank you very much
    nomini

  • Problem reading data from database

    Hi All,
    I'm doing some test with Oracle Coherence, particulary testing partitioned cache of a database. I'm using a client/server archictecture and I developed my own CacheStore. So, the problem is, after start the server and the client, when i do a get() in the client for a object that is on database and not in the cache, the cache answer is it doesn't exist. Isn't it supposed the cache "call" the cache store and read/verify if it is on database?
    My Configuration file:
    <?xml version="1.0"?>
    <!DOCTYPE cache-config SYSTEM "cache-config.dtd">
    <cache-config>
    <caching-scheme-mapping>
    <cache-mapping>
    <cache-name>Recharge</cache-name>
    <scheme-name>partitioned-cache</scheme-name>
    </cache-mapping>
    </caching-scheme-mapping>
    <caching-schemes>
    <distributed-scheme>
    <scheme-name>partitioned-cache</scheme-name>
    <backing-map-scheme>
    <read-write-backing-map-scheme>
    <write-delay>0</write-delay>
    <read-only>false</read-only>
    <internal-cache-scheme>
    <local-scheme>
    <scheme-name>InMemoryScheme</scheme-name>
    </local-scheme>
    </internal-cache-scheme>
    <cachestore-scheme>
    <class-scheme>
    <class-name>RechargeCacheStore</class-name>
    </class-scheme>
    </cachestore-scheme>
    </read-write-backing-map-scheme>
    </backing-map-scheme>
    <listener/>
    <autostart>true</autostart>
    </distributed-scheme>
    </caching-schemes>
    </cache-config>
    Tanks,
    Paulo Sousa

    Hi Paolo,
    You should use a fully qualified class name to enable the JVM class loader to find the RechargeCacheStore class.
    Regards,
    Harv

  • Problems display image from database

    I have set up an image upload page which allows the user to browse for a photograph and save the path of the photograph to the database.
    Unfortunately I can't figure out how to display the picture.
    I use an SQL $Get which retrieves the path correctly, but the image still does not display.
    I've tried 2 methods:
         imagejpeg($row_Get['PictureLocation'])
         This returns an error ...... imagejpeg() expects parameter  1 to be a resource.
    2nd method.
         Insert image then datasources.
         This doesn't do anaything in the browser, but curiosly displays a question marked box in live view.
    Any suggestions?

    I wrote an article about this recently. It's in the Dreamweaver Cookbook: http://cookbooks.adobe.com/post_Display_an_image_stored_in_a_database__PHP_-16637.html.

  • Problem retreiving object from EJB3 Session Bean

    Please delete.
    Edited by: wsaxton1 on Oct 9, 2007 10:18 PM

    So we tested some things that are described in the SDN or by SAP with Connectors.
    We tested JCO version 2.0.12, 2.1.18 and 3.0 in J2EE Projects in netweaver and in Eclipse (Standalone).
    For version 2.0.12 there is a failure that this version is not compatible with the other things in netweaver.
    This version is for standalone and integrated sytems.
    For version 2.1.18 is only described as standalone and so failure happened in netweaver that other classes are coruppted or missed. The internal test in "content administrator" (Ping and Test) do not work and had the same error.
    For version 3.0 (that displace the other two versions) there is many to do in  settings and coding that we do not have tested yet because project is not that small to write it for JCO 3.0 only for testing. When we only displaced files in netweaver the server do not start any more.
    So:
    Is there a way to call R/3 from session bean and 1. create an JCO client or 2. add a client to the "standard" pool of netweaver to use it?
    Any ideas? help? links?
    Project have to be complete in september...
    Our combi is SAP Netweaver 2004 SP21 on Windows XP SP2 / Server 2003 Standard SP1 with JVM 1.4.2_16... need of any more info?
    thx

  • Help me in writing ajax string search from database

    {noformat}*hi everybody,
    please send me a ajax with jsp application
    suppose i enter a word in text area ajax will populate/suggest all string from database ,who started
    from that entering character(s).like a google string search.
    please send full source code
    *{noformat}

    shadab_think_globally wrote:
    {noformat}*hi everybody,
    please send me a ajax with jsp application
    suppose i enter a word in text area ajax will populate/suggest all string from database ,who started
    from that entering character(s).like a google string search.
    please send full source code
    *{noformat}how about you do it yourself?

  • Help required in writing And Reading Xml From Database

    Hi
    i m new to java.
    i m facing problem while writing Xml file from Mysql Database in java i m using the WebRowSet
    and also for Reading WebRowSet
    after reading the Xml i have to save this in Database
    (required source code)
    is there any one to help me in this way
    regards
    aamir

    shadab_think_globally wrote:
    {noformat}*hi everybody,
    please send me a ajax with jsp application
    suppose i enter a word in text area ajax will populate/suggest all string from database ,who started
    from that entering character(s).like a google string search.
    please send full source code
    *{noformat}how about you do it yourself?

Maybe you are looking for

  • Read from the datafile while data acquisition

    I have a program to process and record the data while experimenting. The data file is attached here with (please have a look). It is recorded injection by injection with injection number. Is it possible to read the data file while acquisition and dis

  • Oracle Application R12.1.1 Migration from Solaris to Linux 64-bit

    Hi, Our existing System: On Solaris 9: Database 10.2.0.2 EBS 11.5.10.2 We are planning to Upgrade the system to Database 11.2.0.3 EBS R12.1.3 We also want to migrate to RHEL 5 64-bit. Please let me know if you have experience with respect to the foll

  • The 2.1.3 Software update won't work, the new version of iTunes won't download. Please help.

    For several months now I have not been able to find a solution to either of these two problems. When I have the Apple Software Update program open and I click update, it loads for a second and then goes back to the usual page saying to update. It wil

  • Any way to avoid frequent panic: "IOGMD: not wired for the IODMACommand..."?

    I've had a dual monitor set up on my Mac Pro "Early 2009" since it was delivered new.  The machine has two NVIDIA GeForce GT 120's adapters, each attached to identical Apple LCD Cinema Displays (1920x1200) via Displayport. I've experienced a number o

  • Premiere cs5 crash.

    Idk if its my Mac or Premiere Cs5. I have the pro master collection. And this only happens with premiere. Every 1 out of 3 times I have it open. For about an hour and Im working. The entire computer crashes.My work is saved because  save often. but I