String allocation in ResultSet::getString() issue

Hi all :)
I have been learning the basics of OCCI and I am having a
problem with Debug mode in MSVC. When I retrieve a string from
ResultSet::getString, and the string goes out of scope, I get an
assert about an invalid heap pointer.
I think that somehow the ResultSet object is setting the pointer
inside of the string object in a way which would circumvent the
list of allocations on the debug heap. So that when the string
destructor is called, it tries to free the internal pointer, and
asserts.
Everything works correctly in Release mode.
Is there any suggested way of handling this? Or is there a debug
version of the OCCI?
Here is the simplistic offending code:
while (rs->next())
string username = rs->getString(1);
string passwd = rs->getString(2);
} <--- asserts here
Any help would be great :)
Thanks,
Gerald Fishel

OCCI has multiple copies of libraries that work with different compiler versions. Please make sure you are using the appropriate version of dll. You can search for this topic on OCCI forum.
C++ Call Interface (OCCI)

Similar Messages

  • Column exist but ResultSet.getString(String) return invalid column name

    With oracle 7 db the ResultSet.getString(String) works fine but after the upgrade to oracle 8 db it return invalid column name. ResultSet.getString(int) method works fine.
    Is this a bug in the driver?
    Thanks
    -Reda

    Yes I'm 100 % sure that the columns exist.
    -RedaWell then maybe it's a bug in the Oracle driver. Lord knows it wouldn't be the first time that's happened.

  • ResultSet.getString(String) doesn't return the right text from database

    Hi everybody,
    I'm trying to read some text in Portuguese from a MS-Access database, but the special characters for Portuguese aren't correctly translated by ResultSet.getString(String).
    Here's my piece of code:
    private static void fetchEquipamentoEstabelecimento()
    try
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery(
    " SELECT Eqp.NumSerie, Eqp.Estabelecimento, Estab.Nome, Estab.Cidade, Eqp.Data, Eqp.LPN " +
    " FROM Equipamento Eqp, Estabelecimento Estab " +
    " WHERE TabPreco = 23 " +
              " AND Eqp.Estabelecimento = Estab.Estabelecimento " +
    "ORDER BY NumSerie DESC");
    while(rs.next())
    String nome = rs.getString("Nome");
    System.out.println(rs.getLong("NumSerie")      + " " +
                             rs.getDate("Data")           + " " +
                             rs.getString("LPN")           + " " +
                             nome                              + " " +
                             rs.getString("Cidade"));
    stmt.close();
    catch(SQLException ex)
    printSQLException("fetchEquipamentoEstabelecimento()", ex);
    The output of this piece of code is 1 record joined from tables Equipamento and Estabelecimento:
    111222333 2001-12-15 JHK Pal<X>cio Cristal Guarda
    where the <X> is the greek letter beta. I was expecting a
    portuguese character which is an a with an accent: � (I hope the character was correctly displayed for you)
    I tried replacing
    String nome = rs.getString("Nome");
    with
    String nome = new String(rs.getString("Nome").getBytes(),codepage);
    with codepage="Cp860" (MS-DOS Portuguese)
    and codepage="Cp037" (USA, Canada (Bilingual, French), Netherlands, Portugal, Brazil, Australia)
    but other strange characters were displayed instead of the a with an accent.
    In the MS-Access table Estabelecimento, the column Nome has a Data Type of Text.
    I'm using:
    - JDK 1.2.2
    - MS Access 2000 (in Windows 2000)
    MS Access 97 (in Windows NT 4.0).
    Any help is deeply apreciated.

    Hi!
    When you establish connection to database, try explicitly give instructions about what encoding use your DB, e.g.:
    // connection properties
    Properties connInfo = new Properties();
    connInfo.put("user", username);
    connInfo.put("password", password);
    connInfo.put("charSet", "Cp1251"); // enter your codepage!!!
    // getconnection
    Connection db = DriverManager.getConnection(dataurl, connInfo);

  • How is ResultSet.getString() SUPPOSED to return BINARY types?

    Hello All:
    I got a legacy code to support. The code uses ResultSet.getString() to retrieve BINARY data. ORACLE JDBC driver converts binary data to their hexadecimal representation. It also behaves "correctly" in this sense when I use setString() on prepared statement for BINARY field: it converts valid hexadecimal strings to binary data and rejects strings which contains non-HEX digit characters with SQLException (btw if I give it an odd number of hexadecimal digits, it adds a zero digits FROM THE LEFT e.g. DDDDDDDDDDDDDDDDDDDDDDD becomes 0DDDDDDDDDDDDDDDDDDDDDDD).
    My question is: is all this behavior documented somewhere in JDBC specification and if not how other databases and drives behave on this matter. The code will be possibly used with other databases and I want to know if I can expect some definite behaviour or this is all implementation-specific? I found in JDBC specs that getString() can be used for BINARY data -- but not what it is supposed to return? Even Oracle JDBC documentation does not specify the behavior I discovered -- it just works like that but can I be sure it will be preserved in further versions? Should we raise an issue with Sun to clarify the JDBC specs?
    Any ideas/references? Please share your experience with different databases/drivers. Mine is Oracle 8.0.5.1.0, JDBC driver version is 9.0.1.0.0.
    Pavel

    You can download the JDBC docs from the sun site. I didn't find anything in it which documented the behavior you indicated.

  • MsSQL 2000+Resultset.getString()

    Guys,
    I really need help for this issue. Here is the problem:
    - I am using Java 1.3.1/SE + EE
    - I have Ms SQL/2000
    This is the java code:
    Connection conn = null;
    String name;
    try
         conn = connectionPool.getConnection();
    Statement statement = conn.createStatement();
    ResultSet results = statement.executeQuery
    ("select * from USERAUTHENTICATION");
    while (results.next())
    name = results.getString("UserID");
    statement.close();
    finally
    if (conn != null)
    When java runs results.getString("UserID"), it gives this error:
    java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index
    It is weird because this code works under Oracle database.
    I will appreciate any help.
    PS. I am not expert a Java programmer. So if you have an answer, please give a little bit detail.
    Thank you
    Murat

    Thanks for the answer. I am sure that the column name and my text are exactly the same. The column is VARCHAR.
    Let me give more info:
    - One thing I noticed is that Resultset.getDate() works properly.
    - Resultset.getString() does not work for none of varchar type in SQL.
    I make the connection that way:
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    } catch (Exception ignore) {}
    connectionPool = new MyConnectionPool(
    "jdbc:odbc:MYDATABASENAME", "sa", "");
    I am just wondering weather jdbc.odbc works properly or not.
    Thank you
    Murat

  • A bug in the ResultSet.getString method?

    Hi,
    I am using a 8.1.6 database with UTF8 character set on a Win2000 machine. I've inserted some Hebrew characters into a table, and have been able to read them back properly using SQL+.
    However, when I try to retrieve these values from a simple Java program using the resultSet.getString method (via Oracle JDBC driver 8.1.6) I always get the '?' character for every Hebrew character (English characters work fine). However, if I call the 'getBytes' method of the result set, and create a new String instance from that data, it works fine - help needed!
    Thanks...
    null

    However, if I call the 'getBytes' method of the result set, and create a new String instance from that data, it works fine - help needed!Thanks...
    Please show me how to using 'getBytes' method of the result set and create a new string instance from THAT DATA, because this way doesn't work for me. I am converting ZHT16DBT to Unicode, and all I got is ?????.
    Please help me if you have any idea. THANKS
    null

  • Resultset.getString(). error

    I'm using Oracle 10g with jrockit 1.4.2_13.
    While looping through a cursor it blows up while executing resultset.getString().
    This code has been working for years and just blows up on a specific piece of data.
    The data it's trying to retrieve is .0548. Similar data is retrieved successfully.
    at oracle.sql.LnxLibThin.lnxnuc(LnxLibThin.java:6071)
    at oracle.sql.NUMBER.toText(NUMBER.java:2682)
    at oracle.jdbc.driver.NumberCommonAccessor.getString(NumberCommonAccessor.java:5303)
    at oracle.jdbc.driver.T4CNumberAccessor.getString(T4CNumberAccessor.java:83)
    at oracle.jdbc.driver.OracleResultSetImpl.getString(OracleResultSetImpl.java:355)
    I've tried to upgrade to the latest ojdbc14.jar driver with negative results.
    Here is the code snippet:
    for(int i=1;i<=size;i++){
    str_columnName = (String)ht_elementMappings.get((i)+"");
    sbf_rowData.append("\t\t<"+str_columnName+">");
    //Blows up on the 18th column during the getString
    str_columnValue = rs_object.getString(i);
    sbf_rowData.append( str_columnValue );
    sbf_rowData.append("</"+str_columnName+">");
    sbf_rowData.append("\n");
    sbf_rowData.append("\t</ROW>");
    sbf_rowData.append("\n");
    bufferedWriter.write(sbf_rowData.toString());
    Thanks in advance for any thoughts.

    (1) and (3) are related to gcc versions to use with OCCI. OCCI 10.1 and 10.2 support gcc 3.2.3 (and gcc 2.96). In addition, OCCI 10.2 supports gcc 3.4.3 (libraries are available on OTN).
    2) For retreiving the column names in a ResutSet, you need to use the ResultSet::getColumnListMetaData() interface. You can implement your own solution to call ResultSet::getXXX methods by column name e.g :-
    vector<MetaData> md = rs->getColumnListMetaData();
    map<string, int> columns;//column names to number mapping
    for (int i = 0; i < md.size(); i++) columns[md[i].getString(MetaData::ATTR_NAME)] = i;
    //now "use" column names!
    string ename = rs->getString(columns["ENAME"));
    -Shankar

  • ResultSet.getString() != toString()

    We have a method which retrieves values from a result
    set by simply doing resultSet.getString(index). This
    works fine in all cases and the result retrieved is
    as if the proper type is retrieved and a toString() is
    done on it, except for Timestamps. For Timestamps, we
    are getting a result in the format
    yyyy-M-d.h.mm. ss. fffffffff
    rather than the expected Timestamp.toString() format of
    yyyy-MM-dd hh:mm:ss.fffffffff
    When we later do Timestamp.valueOf(), it chokes because
    the format is incorrect. This is with WLS7SP2 and Oracle
    9.2. Has anyone else encountered this? Any patches to
    fix this available?
    : jay

    Jay Schmidgall wrote:
    We have a method which retrieves values from a result
    set by simply doing resultSet.getString(index). This
    works fine in all cases and the result retrieved is
    as if the proper type is retrieved and a toString() is
    done on it, except for Timestamps. For Timestamps, we
    are getting a result in the format
    yyyy-M-d.h.mm. ss. fffffffff
    rather than the expected Timestamp.toString() format of
    yyyy-MM-dd hh:mm:ss.fffffffff
    When we later do Timestamp.valueOf(), it chokes because
    the format is incorrect. This is with WLS7SP2 and Oracle
    9.2. Has anyone else encountered this? Any patches to
    fix this available?
    : jayI'll guess that you're using a type-2 driver, maybe ours. If I'm
    correct, our type-2 driver will rely on Oracle's OCI functions
    for most values of most data. if you call getString() we simply
    ask the OCI layer for the data as a string, and it does the formatting.
    The solution is to normalize to getTimestamp().
    Joe

  • Random NullPointerException on resultset.getstring

    I have been getting random NullPointerException ever since I have moved my code to a new dev server. I was using tomcat 3 and oracle 9i but moved to tomcat 6 and oracle10g express edition.
    The errors happen mostly when the server is under load.
    here is the code where is breaks
             while(rset.next()) {
                  signNum++;                                //LINE:2172
                  signed.set(rset.getString(1),"CHECKED");  //LINE:2173
                  mark.set(rset.getString(1));              //LINE:2174
              }and here is the stack trace:
    SEVERE: Servlet.service() for servlet MyServlet threw exception
    java.lang.NullPointerException
         at oracle.jdbc.driver.OracleResultSetImpl.getString(OracleResultSetImpl.java:397)
         at runner.MyServlet.getSignUp(MyServlet.java:2174)
    The exception does not happen everytime. It is also odd that the previous line was able to successfully call rset.getString but the very next line gets NullPointerException. Perhaps express edition is to blame?
    This is not the only code that gets exceptions. It happens all over seemingly random. It happens to resultset.getstring and resultset.getint.
    Frustrating

    You were right, it was a multithreading issue.
    Did a google search on "servlet multithreading" and got this article:
    http://www.javaworld.com/javaworld/jw-07-2004/jw-0712-threadsafe.html
    And I realized My servlet had a private variable that was being shared. Been a while since I have been using servlets. The funny thing is that this code ran for years w/o problem on jserv (the really old tomcat). They must not have implemented servlets with multithreading.
    Anyways, mega thanks.

  • ResultSet.getString(int) sometimes slow

    I'm working on an app that I'm attempting to optimize using JProfiler. In the course of inspecting how the time is being devided up, I noticed that there is one place in the code where ResultSet.getString(int) is taking much longer than it does in other areas. Usually, it averages anywhere from almost 0 ms to 0.01 ms per call. However, at one specific area, it's averaged anywhere from 7 to 45 ms per call. I can't find anything that sets it apart from any other calls to getResultSet() -- it happens to be averaged over several hundred rows, whereas the other, quicker calls are occurring when there's anywhere from 1 to tens of thousands of rows, so I can't see how the amount of data would have that affect. The result set is being pulled back along with several others from a single statement execution that has several queries, so they should all have the same fetch size. Does anyone have any ideas on what could cause a call to getString(int) at one specific place in the code to be 3-4 orders of magnitude slower than the others?
    Thanks for any help...

    I think you'd have to examine more of what is going on internally in the result set.
    As you mentioned fetch size could be something. It could be the particular type of column for which you are calling getString on.
    It could be a lot of things. There isn't really any answer for this other than to look at what your particular Result Set implementation is actually doing.

  • OCCI ResultSet- getString Linux problem

    Hello,
    On forum I found how the solve problem for OCCI programm witch using MSVC++. May be anybody known how to correct compile and linking OCCI demo on Linux? The demos crashed at ResultSet->getString().

    It is my fault. I use Fedore Core 4 and gcc4.0. By default it linking with libstdc++.6.so, but when I linkint direct with libstdc++.5.so it OK.
    Thank you for support!

  • String allocation

    When learning object-c, one struggle I has is the confusion about how to alloc/release strings.
    I use one of the following two options to allocate a string:
    NSString *str = \[\[NSString alloc\]initWithFormat:@"Number %i", iNumber\];
    or,
    NSString *str = \[NSString stringWithFormat:@"Number %i", iNumber\];
    Is there any difference between the two?
    If I allocate a string like that above, do I need to explicitly release them at the end of the method? The assumption is that I only used that string for display like "label.text=str;". I inclined to think that since variable "str" is a stack variable, it'll be dismissed upon method return, and the reference to the allocated string will reduce by one, thus causing the only reference to the string is the "label.text" correct?
    or, this is what I think is happening:
    -(void) somemethod
    //string allocated, ref count 1 (by str)
    NSString *str = \[\[NSString alloc\]initWithFormat:@"Number %i", iNumber\];
    //string ref count 2 (one by str and one by label.text)
    label.text = str;
    //upon return, str is released, string ref count 1 (one by label.text)
    return;
    Correct?
    Message was edited by: kopuschen

    kopuschen wrote:
    When learning object-c, one struggle I has is the confusion about how to alloc/release strings.
    Objective-C
    I use one of the following two options to allocate a string:
    NSString *str = \[\[NSString alloc\]initWithFormat:@"Number %i", iNumber\];
    or,
    NSString *str = \[NSString stringWithFormat:@"Number %i", iNumber\];
    Is there any difference between the two?
    For the former, per Cocoa conventions because you caused the object to be created via an alloc message you "own" it and are responsible for releasing it.
    For the latter, the convention is that because you caused the object to be created by a class "convenience" method, you do NOT own it and are not responsible for releasing it. The class (here, NSString) has that responsibility which it will discharge through an autorelease pool.
    ... I inclined to think that since variable "str" is a stack variable, it'll be dismissed upon method return, and the reference to the allocated string will reduce by one, thus causing the only reference to the string is the "label.text" correct?
    No. str is a stack variable, but it is not the NSString object; it is a reference (pointer), an NSString*. str will disappear when the stack is popped on your method's return, but the instance of NSString that was allocated on a heap (not stack) will remain.
    or, this is what I think is happening:
    -(void) somemethod
    //string allocated, ref count 1 (by str)
    NSString *str = \[\[NSString alloc\]initWithFormat:@"Number %i", iNumber\];
    The reference count is 1, but not because of assignment to str. It was 1 after the alloc/init messages were processed.
    //string ref count 2 (one by str and one by label.text)
    label.text = str;
    It may well be 2 after this assignment, depending on what "label.text" is. If text is a property of label and text has the retain attribute, the assignment will increment the NSString object's reference count.

  • Data truncation when using resultset.getString() to a char type field

    In my table ,there is a char type field,such as a char(4) field, for multilanguage use,I put two "double-byte" character in it,
    when I using resultset.getString() to this char type field,I can't get the right result,one char was truncated, so I only get three char, for "double-byte" it 's error code
    this only happen on IBM JVM on AIX 5 , when I use oracle jdbc on windows hotspot vm , it works fine (we use the same oracle on AIX)
    is there any further setting for JDBC driver on AIX ? but it 's thin driver
    and the varchar type works fine at any paltform
    any help ?

    Hi jul!!!
    write like this:
    DATA : wa_flight_data TYPE bapisfldat,
    wa_add_info TYPE bapisfladd,
    wa_availability TYPE bapisflava,
    it_ret TYPE STANDARD TABLE OF bapiret2,
    wa_ret TYPE bapiret2.
    PARAMETERS : pa_carr TYPE sflight-carrid,
    pa_conn TYPE sflight-connid,
    pa_date TYPE sflight-fldate.
    CALL FUNCTION 'BAPI_FLIGHT_GETDETAIL'
    EXPORTING
    airlineid = pa_carr
    connectionid = pa_conn
    flightdate = pa_date
    IMPORTING
    flight_data = wa_flight_data
    additional_info = wa_add_info
    availibility = wa_availability
    TABLES
    *EXTENSION_IN =
    *EXTENSION_OUT =
    return = it_ret.
    write : / 'Flight Data: ',
    wa_flight_data-AIRLINEID,
    wa_flight_data-AIRLINE,
    wa_flight_data-CONNECTID,
    wa_flight_data-FLIGHTDATE,
    wa_flight_data-AIRPORTFR,
    wa_flight_data-CITYFROM,
    wa_flight_data-AIRPORTTO,
    wa_flight_data-CITYTO,
    wa_flight_data-DEPTIME,
    wa_flight_data-ARRTIME,
    wa_flight_data-ARRDATE,
    wa_flight_data-PRICE,
    wa_flight_data-CURR,
    wa_flight_data-CURR_ISO.
    similaryly for wa_add_info and wa_availability.
    becoz u r using work area directly in WRITE statement and
    wa_flight_data TYPE bapisfldat,
    wa_add_info TYPE bapisfladd,
    wa_availability TYPE bapisflava,
    contains both int and char data so u can print all of them together..They can be printed field by field.
    if any doubts..let me knw.
    hope it helps.
    kindly rewrd.

  • ResultSet::getString() causing Abort

    Hey all,
    I've got a problem where whenever I hit this one getString() function, the program crashes. Here is the code I am trying to run, followed by the gdb backtrace
    <code>
    void writeListConfig()
    string listDescription;
    string anonymous;
    string hidden;
    Environment *env = Environment::createEnvironment();
    Connection *conn = env->createConnection("scott", "tiger", "connect.string");
    string sqlQuery = "SELECT NAME_,DESCSHORT_,ANONYMOUS_,HIDDEN_ FROM LISTS_";
    Statement *stmt1 = conn->createStatement (sqlQuery);
    ResultSet *rset1 = stmt1->executeQuery ();
    // here is where it crashes
    listDescription = rset1->getString(2);
    stmt1->closeResultSet (rset1);
    conn->terminateStatement (stmt1);
    env->terminateConnection (conn);
    Environment::terminateEnvironment (env);
    </code>
    <backtrace>
    (gdb) step
    /home/jason/Projects/lyrissuck/src/lyrissuck.cpp:89:1869:beg:0x8049703
    (gdb) info thread
    * 2 Thread 1091445408 (LWP 4320) writeListConfig () at /home/jason/Projects/lyrissuck/src/lyrissuck.cpp:89
    (gdb) backtrace
    #0 writeListConfig () at /home/jason/Projects/lyrissuck/src/lyrissuck.cpp:89
    #1 0x080490eb in main (argc=2, argv=0xbffffc24) at /home/jason/Projects/lyrissuck/src/lyrissuck.cpp:41
    (gdb) print listDescription
    $2 = {_M_dataplus = {<std::allocator<char>> = {<No data fields>}, Mp = 0x40d1aeac ""
    (gdb) frame 0
    #0 writeListConfig () at /home/jason/Projects/lyrissuck/src/lyrissuck.cpp:89
    /home/jason/Projects/lyrissuck/src/lyrissuck.cpp:89:1869:beg:0x8049703
    (gdb) finish
    Stopped due to shared library event
    (gdb) info thread
    * 2 Thread 1091445408 (LWP 4320) 0x4000c690 in dldebug_state_internal () from /lib/ld-linux.so.2
    (gdb) backtrace
    #0 0x4000c690 in dldebug_state_internal () from /lib/ld-linux.so.2
    #1 0x4000c176 in dlinit_internal () from /lib/ld-linux.so.2
    #2 0x40e591c2 in dl_open_worker () from /lib/tls/libc.so.6
    #3 0x4000bf26 in dlcatch_error_internal () from /lib/ld-linux.so.2
    #4 0x40e58daa in dlopen () from /lib/tls/libc.so.6
    #5 0x40e5aba1 in do_dlopen () from /lib/tls/libc.so.6
    #6 0x4000bf26 in dlcatch_error_internal () from /lib/ld-linux.so.2
    #7 0x40e5aa1c in __libc_dlopen_mode () from /lib/tls/libc.so.6
    #8 0x40e38205 in __nss_lookup_function () from /lib/tls/libc.so.6
    #9 0x40e37da0 in __nss_lookup () from /lib/tls/libc.so.6
    #10 0x40e39e07 in __nss_passwd_lookup () from /lib/tls/libc.so.6
    #11 0x40df794b in getpwuid_r@@GLIBC_2.1.2 () from /lib/tls/libc.so.6
    #12 0x40461e5c in snigun () from /home/jason/oracle/product/10.1.0/client_1/lib/libclntsh.so.10.1
    #13 0x403dd8a3 in niqnamcd () from /home/jason/oracle/product/10.1.0/client_1/lib/libclntsh.so.10.1
    #14 0x403dde7b in niqname () from /home/jason/oracle/product/10.1.0/client_1/lib/libclntsh.so.10.1
    #15 0x4031c887 in kwfnran () from /home/jason/oracle/product/10.1.0/client_1/lib/libclntsh.so.10.1
    #16 0x402e8dfc in kwfcinit () from /home/jason/oracle/product/10.1.0/client_1/lib/libclntsh.so.10.1
    #17 0x4016ddd1 in kpuatch () from /home/jason/oracle/product/10.1.0/client_1/lib/libclntsh.so.10.1
    #18 0x402133f2 in kpuspsessionget () from /home/jason/oracle/product/10.1.0/client_1/lib/libclntsh.so.10.1
    #19 0x4021f428 in OCISessionGet () from /home/jason/oracle/product/10.1.0/client_1/lib/libclntsh.so.10.1
    #20 0x40bfa779 in oracle::occi::ConnectionImpl::openConnection () from /home/jason/oracle/product/10.1.0/client_1/lib/libocci.so.10.1
    #21 0x40bf6c33 in oracle::occi::ConnectionImpl::ConnectionImpl () from /home/jason/oracle/product/10.1.0/client_1/lib/libocci.so.10.1
    #22 0x40bf5ad2 in oracle::occi::EnvironmentImpl::createConnection () from /home/jason/oracle/product/10.1.0/client_1/lib/libocci.so.10.1
    #23 0x080497ae in writeListConfig () at /home/jason/Projects/lyrissuck/src/lyrissuck.cpp:89
    #24 0x080490eb in main (argc=2, argv=0xbffffc24) at /home/jason/Projects/lyrissuck/src/lyrissuck.cpp:41
    (gdb) print listDescription
    No symbol "listDescription" in current context.
    (gdb) frame 0
    #0 0x4000c690 in dldebug_state_internal () from /lib/ld-linux.so.2
    </backtrace>

    You need to call rset1->next() to fetch the results before accessing the resultset.

  • ResultSet + getString("field")

    hey all!
    just a question. i ve been trying to do stuff with ResultSets. basically i ve got mysql connected and everything is fine except one little thing. when i get my ResultSet and then try to get the fields from it
    eg
    ResultSet result = selects.getResultSet(); /// this gives me my result set
    while(result.next()){
    String email = result.getString("email");
    String mess = result.getString("message");
    String date = result.getString("date");
    System.out.println(email + " xx " + mess + " xx " + date);
    now the problem. lets say i ve got 3 records (lines) in that resultSet. but this way only the last two show???? the first one never shows. to fix it i have to do this
    ResultSet result = selects.getResultSet(); /// this gives me my result set
    String e = result.getString("email");
    String m = result.getString("message");
    String d = result.getString("date");
    System.out.println(e + " xx " + m + " xx " + d); // this gives me my first record
    while(result.next()){ // this gives me my other two (second and third) records
    String email = result.getString("email");
    String mess = result.getString("message");
    String date = result.getString("date");
    System.out.println(email + " xx " + mess + " xx " + date);
    it is not a big issue and i its quite late so instead of doing research on google im going to sleep and hpefully tomorrow someone will reply ((:
    thanks
    v.v.
    os = slackware 11.0
    java =
    java version "1.5.0_09"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b01)
    Java HotSpot(TM) Client VM (build 1.5.0_09-b01, mixed mode, sharing)

    This is the code I'm using right now and it's working
    if (conn != null)  {
                  mySqlDB.setSql("SELECT * FROM apps ");
                  stmt = conn.prepareStatement(mySqlDB.getSql());
                  results = stmt.executeQuery();
             while(results.next()){
                  String name = results.getString("name");
                  int id = results.getInt("id");
                  String email = results.getString("Email");
                  Application temp = new Application(name, id,  email);
                  applicationList.add(temp);
             }

Maybe you are looking for

  • New iPad PDF won't open in iBooks from Safari

    I found the PDF in the Federal Regester I needed in Safari it offered me the option to open in iBooks, iBooks opens but the PDF is not there. I've done a search to make sure I didn't miss it. This is the first time I've ever had a issue with this pro

  • Blurry/fuzzy fonts on external display (Dell 2209WA)

    Hi, I recently bought a Dell 2209WA and I'm not too happy with how the fonts are displayed on it. All the fonts seems blurry/fuzzy/jagged. I have tried to change the sharpness of the display as well as the font smoothing style(I get best results on M

  • Clone Stamp Tool does not work

    This is a re-post of an old problem. Using PS CS4 Extended v. 11.0.2 in Win XP SP3. The clone stamp tool does not alter my image. After selecting source region, cursor hovers over the target region and the preview looks like what one would expect. Af

  • HT204291 Airplay video but no audio through Safari

    I have a problem with Airplay not allowing audio from Safari based media. I am trying to steam an NFL game but the audio will not transfer from built in speakers to Airplay. I have noticed this is an issue on the discussion boards and have done all t

  • How can I  install the inspirational browser?

    I uninstalled the browser and now I can't install the inspirational browser.  Any suggestions.