Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQLite database not accepting more than 1000 rows?

I am writing an android app. I am parsing lines from a txt file and inserting data from each line into an SQLite database. But the insertion process stops at exactly 1000 entries. There are more that 3000 entries, but the insertion process stops at 1000. What is going wrong?

Edit: Here is the code:

try{
            InputStream is = ctx.getAssets().open("feedtitlesandaddresses.txt");
            InputStreamReader iz=new InputStreamReader(is);
            BufferedReader br = new BufferedReader(iz);
            ContentValues values = new ContentValues();
            while((line=br.readLine())!=null) {
            StringTokenizer stringTokenizer = new StringTokenizer(line, "<");
            String firstNumber="";
            String strfinal="";
              **//code which gives values to strfinal and firstNumber excluded
              values.put(KEY_NAME, firstNumber); // Contact Name
              values.put(KEY_PH_NO,strfinal); // Contact Phone

              // Inserting Row

              db.insert(TABLE_CONTACTS, null, values);}




   }catch(Exception e){Log.d("yeah error is"+e,"twitch12");}
like image 382
Ankit Rawat Avatar asked Oct 15 '25 16:10

Ankit Rawat


1 Answers

Steps:

  • Go to SQLiteStudio
  • Select Tools > Open Configuration dialog > Data browsing
  • In Data browsing you will have Number of data rows per page, now choose the size as you wish.

I have same problem as yours, and I changed the number 1000 to 2000 and it worked like a charm. Hope it will work for you.

like image 146
Karthika Stephen Avatar answered Oct 18 '25 08:10

Karthika Stephen