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

  • Home
  • SEARCH
  • 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 8485713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:43:31+00:00 2026-06-10T20:43:31+00:00

I need to process a SQLite dataset in an Android system. In my dataBaseHelper

  • 0

I need to process a SQLite dataset in an Android system.

In my dataBaseHelper file (DataBaseAccessor) I have the following code (which when attached to a listview shows the relevant data).

public static ArrayList<QuestionListQuestion> getQuestionListQuestions(long id){
String qry = "select QuestionListQuestionID, QuestionListQuestionQuestionListID, QuestionListQuestionQuestionID, QuestionListQuestionSortOrder, QuestionListQuestionSupplementalQuestionIDYes, QuestionListQuestionSupplementalQuestionIDNo, QuestionListQuestionSupplementalQuestionIDText, QuestionListQuestionSurveyGroupID from QuestionListQuestion  where  QuestionListQuestionQuestionListID=" + id;
ArrayList<QuestionListQuestion> list = new ArrayList<QuestionListQuestion>();
try{
    Cursor cursor = wdb.rawQuery(qry, null);
while (cursor.moveToNext()) {
QuestionListQuestion questionlistquestion = new QuestionListQuestion();
    questionlistquestion.QuestionListQuestionID = cursor.getLong(0);
    questionlistquestion.QuestionListQuestionQuestionListID = cursor.getLong(1);
    questionlistquestion.QuestionListQuestionQuestionID = cursor.getLong(2);
    questionlistquestion.QuestionListQuestionSortOrder = cursor.getLong(3);
questionlistquestion.QuestionListQuestionSupplementalQuestionIDYes = cursor.getString(4);       questionlistquestion.QuestionListQuestionSupplementalQuestionIDNo = cursor.getString(5);
questionlistquestion.QuestionListQuestionSupplementalQuestionIDText = cursor.getString(6);
questionlistquestion.QuestionListQuestionSurveyGroupID = cursor.getLong(7);
list.add(questionlistquestion);
}
    cursor.close();
}
catch (Exception e) {
    e.printStackTrace();
}
return list;
}

I now need to extend the system so that I can process the data and create new records in another table based on the original list returned.

I tried the following attached to a button (selecting the relevant list ID from a spinner):-

QuestionListID = (String) SiteGenerateQuestions.this.spnQuestL.getSelectedItem().toString();
long SpinnerSelectedBT;
SpinnerSelectedBT = GenerateQuestions.this.spnQuestL.getSelectedItemId();
list = DatabaseAccessor.getQuestionListQuestions(SpinnerSelectedBT);
for (int i=0; i < list.size(); i++){
Toast.makeText(SiteGenerateQuestions.this," list.get(" + i + ")   = " + list.get(i) + " "  , Toast.LENGTH_SHORT).show();
}

The Toast displays the following:-

list.get(0) =  com.tw.question.entity.QuestionListQuestion@407a6F70
list.get(1) =  com.tw.question.entity.QuestionListQuestion@407bc170
etc...

How can I get access to the actual data instead of … .entity.QuestionListQuestion@407bc170 or am I completely off-track?

Many Thanks

  • 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-10T20:43:33+00:00Added an answer on June 10, 2026 at 8:43 pm

    I agree with @wsanville the get() method will return the object in that location of the list. When you print out an object (in a toast, log, System.out.println etc) it will use the toString() value in the printout. The default toString() is the package name followed by @ which is followed by a hex representation of that object. Your class will need to override the toString() method so when you use get() it will print out whatever you put in your toString() method.

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

Sidebar

Related Questions

I have a text file which contains data I need to preload into a
I have the next problem: I need to process only 1 request at a
I'm working on a project in which I need to process a huge amount
I have android app that talks to server and syncs some data int SQLite
I am currently working on an iPad project for which I need to process
I need to do the following tasks: 1) Read some data from sqlite database
I have an AsyncTask which launches a DatabaseHelper class from DoinBackground which copies an
I need process concurent requests at my application. I use this code: public class
Actually I have a CGI form which consists of textfields and I need a
I have a text file with about 100,000 lines (5 MB), which is updated

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.