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 8965171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:45:24+00:00 2026-06-15T16:45:24+00:00

I am making an SQLite database in Android in which i have to store

  • 0

I am making an SQLite database in Android in which i have to store 40k words in it. I am getting the words from q txt file.

I am storing the words first in a list and then from list to database. But when I store words in table and retrieve from that i get only 20k words. The rowcount of the table is also 20k but i have saved 40k words.

public void createTable(SQLiteDatabase db, ArrayList<String> words)
{
    int i=0;


        db.execSQL(DATABASE_CREATE);

        System.out.println("created table going further");

        for( i=0; i < words.size();i++)
        {
            String[] pair=words.get(i).split(",");

            insertWord(pair[0].trim(), Integer.parseInt(pair[1].trim()), db);
            System.out.println(i++);            
        }
        System.out.println("in database  "+i+" words are there in db");     
}

I don’t know whats going on here.

  • 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-15T16:45:26+00:00Added an answer on June 15, 2026 at 4:45 pm

    You are incrementing i twice, one in the for and one in the print statement, change this to

    for( i=0; i < words.size();i++)
        {
            String[] pair=words.get(i).split(",");
    
            insertWord(pair[0].trim(), Integer.parseInt(pair[1].trim()), db);
            System.out.println(i);            
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a DataMapper based SQLite database. I store the time at which the
I'm making chat application and read messages data from SQLite database. I want to
I'm fairly new to SQL/SQLite and am making a database for storing highscores/power/misc other
I need to use SQLite database file as a file for storing information, and
I'm making an app that uses a SQLite database to store data. Sometimes my
I need to create JSON from Sqlite database in a iphone application. I have
I need to store sensitive data in a sqlite database in an android app.
I am making a small iPhone application in which I have implemented the database
I am having trouble with the sqlite database with an android program. I'm making
I have an android application with a SQLite database and I am trying to

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.