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");}
Steps:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With