Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8133633
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:40:44+00:00 2026-06-06T09:40:44+00:00

I am beginner on sqlite,I use it I have no choice and I code

  • 0

I am beginner on sqlite,I use it I have no choice and I code with java, I have a request that It should return as reslutat two columns, but It returns anything, the resultSet is org.sqlite.RS@..,please I need help on this , thank you in advance.

        public List<String> executeSelect( String ArgRequete, boolean All) throws SQLException
{
    String ReturnColumn = ArgRequete.substring( ArgRequete.indexOf( "SELECT" )+ 6, ArgRequete.indexOf( "FROM" ) ).replaceAll(" ","");
    List<String> Str = new ArrayList<String>();
    logger.info("ret :"+ReturnColumn);
    String[] columns=ReturnColumn.split(",");
    for(String ico:columns){
     logger.info(ico);
   }
    stmt = con.createStatement();

    rs = stmt.executeQuery( ArgRequete );
    logger.info(ArgRequete);

    logger.info("mon resultSet:"+rs);
    if ( !All )
    {
        if ( rs.next() )
        {
            String result = "";
                   for(String aColumn : columns){
                                result += rs.getString(aColumn ) + ",";
                                logger.info(result);

                    }
                    Str.add( result );
         }
    }
    while ( rs.next() && All )
    {
                               String result = "";
                               for(String aColumn : columns){
                                           result += rs.getString( aColumn ) + ",";
                               }
        Str.add( result );
    }
    stmt.close();
    return Str;
}

   public void etapeParametrerOption(String login) throws IOException, SQLException
{
    assertTrue( "Texte 'Paramétrer les options' non présent, voir code source HTML dans LogOut",selenium.isTextPresent( "Paramétrer les options" ) );

   String [] tab=LogFile.showWSEtAppelCOffrEFrom(login);
  List<String>ls=new ArrayList<String>();

   for(String itab : tab){

       ls=dbCOffrE.executeSelect("SELECT busitypid,attblabel FROM t_article art, t_attribute att , t_srvbrick_attr_article srv WHERE att.attbid = srv.attbid and art.artid = srv.artid and att.modoptidmodifiable = '2' and (att.attbinactivationdate is null or att.attbinactivationdate < date('now')) and art.artshortlabel='"+itab+"'",false);  logger.info("ma liste :"+ls);
   }}

what my file log containt

 INFO  [com.sfr.price.functionalTest.commons.SQLBase.executeSelect](82) [] ret :busitypid,attblabel
 INFO  [com.sfr.price.functionalTest.commons.SQLBase.executeSelect](85) [] busitypid
 INFO  [com.sfr.price.functionalTest.commons.SQLBase.executeSelect](85) [] attblabel
 INFO  [com.sfr.price.functionalTest.commons.SQLBase.executeSelect](90) [] SELECT busitypid,attblabel FROM t_article art, t_attribute att , t_srvbrick_attr_article srv WHERE att.attbid = srv.attbid and art.artid = srv.artid and att.modoptidmodifiable = '2'  and art.artshortlabel='8001P'
 INFO  [com.sfr.price.functionalTest.commons.SQLBase.executeSelect](93) [] mon resultSet:org.sqlite.RS@24c672
 INFO  [com.sfr.price.functionalTest.scenario.impl.AJLINGE.etapeParametrerOption](799) [] ma liste :[]
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T09:40:45+00:00Added an answer on June 6, 2026 at 9:40 am

    The reason you’re getting org.sqlite.RS@24c672 when printing your result set is because that class has not overridden the default implementation of toString() in the base object class. According to the SQLiteJDBC documentation, you should be able to iterate through the ResultSet and print out values accordingly.

    Something like this should work:

    while (rs.next()) {
        logger.info("busitypid = " + rs.getString("busitypid");
        logger.info("attblabel = " + rs.getString("attblabel");
    }
    rs.close();
    

    Also, I do not understand the purpose of your boolean All. (Note: Java style convention indicates that this variable should be named all, with lowercase first letter.) Because of the way your while loop and if statement are written, you will end up either printing only the column headings, or only the contents of your result set. Based on the contents of your log file, I’d assume you’d passed in All = false — which would make your output correct.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Beginner in Android development. My code crashes. I have made a simple Java method
Beginner level question Scenario: Have simple string cocantation tool, that I might expand later
Absolute beginner question: I have a template file index.html that looks like this: ...
Am Beginner to java.I have a small doubt while i am developing an application
Beginner programmer here....hope it makes sense :) I have created a console app that
I'm a beginner with sqlite coming from mysql. maybe my question is dumb but
Total beginner with PHP: I have an form based on table data that the
I have followed this tutorial to use SQLite db in my android app. Since
I am new to sql (and sqlite) and so far I have learned that
Beginner question: I want to debug some code that compiles. I pressed debug, it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.